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 by DomainMapperManager. 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
  • 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
  • Method Summary

    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
     

    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 Details

    • 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 information
      repositoryDomain - The repository specific instance to affect and return
      contextInfo - The context information used to make tracking determinations relevant to sandboxing and multitenant concerns. See TrackableRepository 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 information
      businessDomain - The business domain instance to affect and return
      contextInfo - The context information used to make tracking determinations relevant to sandboxing and multitenant concerns. See TrackableRepository 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 interface org.springframework.core.Ordered