Class CategoryProductDomainMapperMember

java.lang.Object
com.broadleafcommerce.catalog.service.CategoryProductDomainMapperMember
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

public class CategoryProductDomainMapperMember extends Object implements com.broadleafcommerce.data.tracking.core.mapping.DomainMapperMember
When a CategoryProduct is persisted at the application catalog level, guarantee the entity instance is deposited in the product's catalog line, rather than the category's line, if different. This guarantees the CategoryProduct relationship is recognized during indexing when reviewing all the factors that impact a Product's search indexing state.
  • Field Summary

    Fields inherited from interface com.broadleafcommerce.common.extension.data.DataRoutePartitionAware

    ALL_MATCH

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
    CategoryProductDomainMapperMember(ProductRepository<com.broadleafcommerce.data.tracking.core.Trackable> productRepository, com.broadleafcommerce.data.tracking.core.policy.trackable.CatalogFinder<com.broadleafcommerce.data.tracking.core.tenant.domain.Catalog> catalogFinder, com.broadleafcommerce.common.extension.TypeFactory factory)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <D> D
    fromBusinessDomain(Object businessDomain, D repositoryDomain, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
     
     
    int
    Order late in the mapping pipeline so that we can tweak whatever catalog was previously set, if needed.

    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, modifyMap

    Methods inherited from interface com.broadleafcommerce.data.tracking.core.mapping.DomainMapperMember

    fromRepositoryDomain
  • Constructor Details

    • CategoryProductDomainMapperMember

      public CategoryProductDomainMapperMember(ProductRepository<com.broadleafcommerce.data.tracking.core.Trackable> productRepository, com.broadleafcommerce.data.tracking.core.policy.trackable.CatalogFinder<com.broadleafcommerce.data.tracking.core.tenant.domain.Catalog> catalogFinder, com.broadleafcommerce.common.extension.TypeFactory factory)
  • Method Details

    • getDataRoutePartition

      public String getDataRoutePartition()
      Specified by:
      getDataRoutePartition in interface com.broadleafcommerce.common.extension.data.DataRoutePartitionAware
    • fromBusinessDomain

      public <D> D fromBusinessDomain(Object businessDomain, D repositoryDomain, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Specified by:
      fromBusinessDomain in interface com.broadleafcommerce.data.tracking.core.mapping.DomainMapperMember
    • getOrder

      public int getOrder()
      Order late in the mapping pipeline so that we can tweak whatever catalog was previously set, if needed.
      Specified by:
      getOrder in interface com.broadleafcommerce.data.tracking.core.mapping.DomainMapperMember
      Specified by:
      getOrder in interface org.springframework.core.Ordered
      Returns:
      The order of precedence in which to run this mapper member.