Class BasicAuditDomainMapperMember
java.lang.Object
com.broadleafcommerce.data.tracking.core.mapping.BasicAuditDomainMapperMember
- All Implemented Interfaces:
com.broadleafcommerce.common.extension.data.DataRoutePartitionAware,DomainMapper,DomainMapperMember,org.springframework.core.Ordered
A special
DomainMapperMember which is responsible for adding basic audit information
during entity persistence.-
Field Summary
Fields inherited from interface com.broadleafcommerce.common.extension.data.DataRoutePartitionAware
ALL_MATCHFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<D> DdeleteMap(D repositoryDomain, ContextInfo contextInfo) In cases where deletion actually results in a modified state to persist (e.g.<D> DfromBusinessDomain(Object businessDomain, D repositoryDomain, ContextInfo contextInfo) Map and return a populated repository domain instance, based on information provided in a business domain.intgetOrder()<D,P> D modifyMap(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.voidsetBasicAuditUtility(BasicAuditUtility basicAuditUtility) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.broadleafcommerce.data.tracking.core.mapping.DomainMapper
getBusinessDomainTypeMethods inherited from interface com.broadleafcommerce.data.tracking.core.mapping.DomainMapperMember
fromRepositoryDomain
-
Constructor Details
-
BasicAuditDomainMapperMember
public BasicAuditDomainMapperMember()
-
-
Method Details
-
getDataRoutePartition
- Specified by:
getDataRoutePartitionin interfacecom.broadleafcommerce.common.extension.data.DataRoutePartitionAware
-
fromBusinessDomain
public <D> D fromBusinessDomain(@Nullable Object businessDomain, @Nullable D repositoryDomain, @Nullable ContextInfo contextInfo) Description copied from interface:DomainMapperMemberMap 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:
fromBusinessDomainin 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. SeeTrackableRepositoryfor 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:DomainMapperPerform a mapping operation from business domain instance to persistence specific instance, presumably modifying the state of the persistence specific instance.- Specified by:
modifyMapin 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. SeeTrackableRepositoryfor 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.
-
deleteMap
Description copied from interface:DomainMapperIn cases where deletion actually results in a modified state to persist (e.g. archived soft delete), this method will modify the state appropriately toward that end.- Specified by:
deleteMapin interfaceDomainMapper- Type Parameters:
D- The repository domain type- Parameters:
repositoryDomain- The persistence domain instance to inactivatecontextInfo- The context information used to make tracking determinations relevant to sandboxing and multitenant concerns.- Returns:
- The repository domain state resulting from the delete operation. Return null if no action taken.
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceDomainMapperMember- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-
setBasicAuditUtility
-