Interface CustomerDao
- All Superinterfaces:
Dao
- All Known Implementing Classes:
DefaultCustomerDao
Data Access Object for looking up the customer.
-
Method Summary
Modifier and TypeMethodDescriptionfindCustomerByCustomerId(String customerId) Finds the customer by the unique customerIddefault Optional<CustomerModel>findFirstCustomerByBaseSitePK(PK baseSitePK) Finds the first customer, who registered to this BaseSite
-
Method Details
-
findCustomerByCustomerId
Finds the customer by the unique customerId- Parameters:
customerId- the unique customerId in UUID format, that represents the customer- Returns:
- The customer found
- Throws:
AmbiguousIdentifierException- If more than one customer was found
-
findFirstCustomerByBaseSitePK
Finds the first customer, who registered to this BaseSite- Parameters:
baseSitePK- the BaseSite PK- Returns:
- Optional.empty() is no one customer found, and Optional.of(Customer) is one customer found
-