Class ProductPersistedDomainCollectingMapperMember
- All Implemented Interfaces:
com.broadleafcommerce.common.extension.data.DataRoutePartitionAware,com.broadleafcommerce.data.tracking.core.mapping.DomainMapper,com.broadleafcommerce.data.tracking.core.mapping.DomainMapperMember,org.springframework.core.Ordered
In DefaultProductService, CRUD requests almost always flow through
CrudEntityHelper, which performs a variety of operations before returning the ultimate
result. The method contract just accepts and returns the business domain Product, which
is sufficient in most cases. However, in some cases, the caller may find it valuable to have
access to the fully updated persisted-domain Trackable representation to provide it as
input to some other downstream process that can't use the business domain representation.
This mapper member is intended to run at the end of the mapping pipeline (last priority) during
DomainMapperMember.fromRepositoryDomain(Object, Object, ContextInfo) and collects the
persisted domain instances into a ThreadLocal that the caller can access via
CollectedProductPersistedDomainContext.
- Since:
- Catalog Service 2.3.0, Release Train 2.3.0
- See Also:
-
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<P> PfromRepositoryDomain(Object repositoryDomain, P businessDomain, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) intgetOrder()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
deleteMap, getBusinessDomainType, modifyMapMethods inherited from interface com.broadleafcommerce.data.tracking.core.mapping.DomainMapperMember
fromBusinessDomain
-
Constructor Details
-
ProductPersistedDomainCollectingMapperMember
public ProductPersistedDomainCollectingMapperMember()
-
-
Method Details
-
getDataRoutePartition
- Specified by:
getDataRoutePartitionin interfacecom.broadleafcommerce.common.extension.data.DataRoutePartitionAware
-
fromRepositoryDomain
@Nullable public <P> P fromRepositoryDomain(Object repositoryDomain, P businessDomain, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) - Specified by:
fromRepositoryDomainin interfacecom.broadleafcommerce.data.tracking.core.mapping.DomainMapperMember
-
getOrder
public int getOrder()- Specified by:
getOrderin interfacecom.broadleafcommerce.data.tracking.core.mapping.DomainMapperMember- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-