Interface DomainMapperMember
-
- All Superinterfaces:
com.broadleafcommerce.common.extension.data.DataRoutePartitionAware
,DomainMapper
,org.springframework.core.Ordered
- All Known Implementing Classes:
BasicAuditDomainMapperMember
,BusinessTypeAwareDomainMapperMember
,ChangeContainerOverridableDomainMapperMember
,CreateSetupDomainMapperMember
,ModelMapperDomainMapperMember
,MonetaryMapperMember
,SingleIndexRequestNotificationStateMapperMember
,UpdateValidationDomainMapperMember
public interface DomainMapperMember extends DomainMapper, org.springframework.core.Ordered, com.broadleafcommerce.common.extension.data.DataRoutePartitionAware
Individual contributor to a transformation pipeline facilitated byDomainMapperManager
. Members are responsible for targeted mapping between repository domain and business domain (and vice versa). Members can contribute to a portion of the transformation/mapping, or perform it in its entirety. Members are executed in the order defined.- Author:
- Jeff Fischer
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default <D> D
fromBusinessDomain(Object businessDomain, D repositoryDomain, ContextInfo contextInfo)
Map and return a populated repository domain instance, based on information provided in a business domain.default <P> P
fromRepositoryDomain(Object repositoryDomain, P businessDomain, ContextInfo contextInfo)
Map and return a populated business domain instance, based on information provided in a repository domain instance.default int
getOrder()
-
Methods inherited from interface com.broadleafcommerce.common.extension.data.DataRoutePartitionAware
getDataRoutePartition
-
Methods inherited from interface com.broadleafcommerce.data.tracking.core.mapping.DomainMapper
deleteMap, getBusinessDomainType, modifyMap
-
-
-
-
Method Detail
-
fromBusinessDomain
@Nullable default <D> D fromBusinessDomain(Object businessDomain, D repositoryDomain, @Nullable ContextInfo contextInfo)
Map and return a populated repository domain instance, based on information provided in a business domain. The passed repositoryDomain parameter is generally transformed and returned.- Type Parameters:
D
- The repository domain type- Parameters:
businessDomain
- The business instance containing the relevant property informationrepositoryDomain
- The repository specific instance to affect and returncontextInfo
- The context information used to make tracking determinations relevant to sandboxing and multitenant concerns. SeeTrackableRepository
for more info on persistence behavior based on context.- Returns:
- The populated repository domain instance. Should return null if no action taken.
-
fromRepositoryDomain
@Nullable default <P> P fromRepositoryDomain(Object repositoryDomain, P businessDomain, @Nullable ContextInfo contextInfo)
Map and return a populated business domain instance, based on information provided in a repository domain instance. The passed businessDomain parameter is generally transformed and returned.- Type Parameters:
P
- The business domain type- Parameters:
repositoryDomain
- The repository domain instance containing the relevant property informationbusinessDomain
- The business domain instance to affect and returncontextInfo
- The context information used to make tracking determinations relevant to sandboxing and multitenant concerns. SeeTrackableRepository
for more info on persistence behavior based on context.- Returns:
- The populated business domain instance. Should return null if no action taken.
-
getOrder
default int getOrder()
- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-
-