Class DefaultCustomerHydrationService
- java.lang.Object
-
- com.broadleafcommerce.customer.service.hydration.DefaultCustomerHydrationService
-
- All Implemented Interfaces:
CustomerHydrationService
public class DefaultCustomerHydrationService extends Object implements CustomerHydrationService
-
-
Constructor Summary
Constructors Constructor Description DefaultCustomerHydrationService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.data.domain.Page<Customer>
hydrate(org.springframework.data.domain.Page<Customer> customers, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Hook point to hydrate entities fetched from the internal search endpoint.
-
-
-
Method Detail
-
hydrate
public org.springframework.data.domain.Page<Customer> hydrate(org.springframework.data.domain.Page<Customer> customers, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Description copied from interface:CustomerHydrationService
Hook point to hydrate entities fetched from the internal search endpoint. SeeCustomerEndpoint.readAllCustomers(ContextInfo, String, boolean, Node, Pageable)
.By default, the internal search does not require hydration since the displayed fields exist on the
Customer
entity. However, this method can be overridden to hydrate and display fields from related entities, e.g.Account
.- Specified by:
hydrate
in interfaceCustomerHydrationService
- Parameters:
customers
- the page of customers to hydratecontext
- context information around sandbox and multitenant state- Returns:
- The page of hydrated customers
-
-