Class ChangeContainerOverridableDomainMapperMember
- java.lang.Object
-
- com.broadleafcommerce.data.tracking.core.mapping.ChangeContainerOverridableDomainMapperMember
-
- All Implemented Interfaces:
com.broadleafcommerce.common.extension.data.DataRoutePartitionAware
,DomainMapper
,DomainMapperMember
,org.springframework.core.Ordered
public class ChangeContainerOverridableDomainMapperMember extends Object implements DomainMapperMember
ADomainMapperMember
implementation which is responsible for mapping theChangeContainer
for aChangeContainerOverridable
projection domain over to its repository domain. This allows the projection domains to support row-level overrides of change container information during bulk operations.- Author:
- Nick Crum (ncrum)
-
-
Constructor Summary
Constructors Constructor Description ChangeContainerOverridableDomainMapperMember(com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <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.String
getDataRoutePartition()
int
getOrder()
<D,P>
DmodifyMap(D repositoryDomain, P businessDomain, ContextInfo contextInfo, boolean allowNull)
Perform a mapping operation from business domain instance to persistence specific instance, presumably modifying the state of the persistence specific instance.protected <D> D
overrideChangeContainerIfApplicable(Object businessDomain, D repositoryDomain)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.broadleafcommerce.data.tracking.core.mapping.DomainMapper
deleteMap, getBusinessDomainType
-
Methods inherited from interface com.broadleafcommerce.data.tracking.core.mapping.DomainMapperMember
fromRepositoryDomain
-
-
-
-
Method Detail
-
getDataRoutePartition
public String getDataRoutePartition()
- Specified by:
getDataRoutePartition
in interfacecom.broadleafcommerce.common.extension.data.DataRoutePartitionAware
-
getOrder
public int getOrder()
- Specified by:
getOrder
in interfaceDomainMapperMember
- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-
fromBusinessDomain
public <D> D fromBusinessDomain(Object businessDomain, D repositoryDomain, ContextInfo contextInfo)
Description copied from interface:DomainMapperMember
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.- Specified by:
fromBusinessDomain
in interfaceDomainMapperMember
- 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.
-
modifyMap
public <D,P> D modifyMap(D repositoryDomain, P businessDomain, ContextInfo contextInfo, boolean allowNull)
Description copied from interface:DomainMapper
Perform a mapping operation from business domain instance to persistence specific instance, presumably modifying the state of the persistence specific instance.- Specified by:
modifyMap
in interfaceDomainMapper
- Type Parameters:
D
- The repository domain typeP
- The business domain type- Parameters:
repositoryDomain
- The persistence domain instance to modifybusinessDomain
- The business instance containing changes to map to the repository domaincontextInfo
- The context information used to make tracking determinations relevant to sandboxing and multitenant concerns. SeeTrackableRepository
for more info on persistence behavior based on context.allowNull
- Whether or not null values in properties in the payload instance should be ignored during the mapping operation.- Returns:
- The modified repository domain instance. Return null if no action taken.
-
overrideChangeContainerIfApplicable
protected <D> D overrideChangeContainerIfApplicable(Object businessDomain, D repositoryDomain)
-
-