Interface OptionTemplateGroupHydrationService
- All Known Implementing Classes:
DefaultOptionTemplateGroupHydrationService
public interface OptionTemplateGroupHydrationService
Responsible for performing simple hydration of the references to
OptionTemplates
made within an OptionTemplateGroup
by querying for those references and
populating their full values.- Author:
- Samarth Dhruva (samarthd)
-
Method Summary
Modifier and TypeMethodDescriptionhydrate
(OptionTemplateGroup group, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Gets the IDs ofOptionTemplates
that are referenced by thegroup
, finds the corresponding items in the data store, and then replaces each reference with the fully populated representation of the item.org.springframework.data.domain.Page<OptionTemplateGroup>
hydrate
(org.springframework.data.domain.Page<OptionTemplateGroup> unhydrated, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Gets the IDs ofOptionTemplates
that are referenced by each group inunhydrated
, finds the corresponding items in the data store, and then replaces each reference with the fully populated representation of the item.
-
Method Details
-
hydrate
OptionTemplateGroup hydrate(OptionTemplateGroup group, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Gets the IDs ofOptionTemplates
that are referenced by thegroup
, finds the corresponding items in the data store, and then replaces each reference with the fully populated representation of the item.- Parameters:
group
- the unhydratedOptionTemplateGroup
whose references should be hydratedcontextInfo
- context information surrounding sandboxing and multitenant state- Returns:
- the given
group
after hydrating its references
-
hydrate
org.springframework.data.domain.Page<OptionTemplateGroup> hydrate(org.springframework.data.domain.Page<OptionTemplateGroup> unhydrated, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Gets the IDs ofOptionTemplates
that are referenced by each group inunhydrated
, finds the corresponding items in the data store, and then replaces each reference with the fully populated representation of the item.A page of those hydrated option template groups is returned.
- Parameters:
unhydrated
- the page of unhydrated option template groups whose references should be hydratedcontextInfo
- context information surrounding sandboxing and multitenant state- Returns:
- a page of the option template groups after hydrating their references
-