Class SimplePayloadMapper


  • public class SimplePayloadMapper
    extends Object
    • Constructor Summary

      Constructors 
      Constructor Description
      SimplePayloadMapper​(com.broadleafcommerce.common.extension.TypeFactory typeFactory)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <D extends com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable & com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware,​P>
      List<P>
      fromRepositoryDomain​(@NonNull List<D> repositoryDomains)  
      <D extends com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable & com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware,​P>
      P
      fromRepositoryDomain​(D repositoryDomain)  
      <D extends com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable,​P>
      P
      fromRepositoryDomain​(D repositoryDomain, @NonNull Class<P> businessDomain)  
      protected Map<String,​org.modelmapper.ModelMapper> getMappers()  
      protected <D extends com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable>
      org.modelmapper.ModelMapper
      getToMeMapper​(D repositoryDomain, boolean allowNull)  
      protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()  
      <D extends com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable,​P>
      D
      modifyMap​(D domain, P modifications)
      Equivalent to modifyMap(ModelMapperMappable, Object, boolean) with the boolean allowNull set to true.
      <D extends com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable,​P>
      D
      modifyMap​(D repositoryDomain, P businessDomain, boolean allowNull)  
      <D extends com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable>
      D
      toRepositoryDomain​(@NonNull Object businessDomain, @NonNull Class<D> repositoryDomain)  
      <D extends com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable,​R extends com.broadleafcommerce.common.extension.DomainTypeAware>
      D
      toRepositoryDomain​(@NonNull Object businessDomain, R repositoryDomain)  
    • Constructor Detail

      • SimplePayloadMapper

        public SimplePayloadMapper​(com.broadleafcommerce.common.extension.TypeFactory typeFactory)
    • Method Detail

      • toRepositoryDomain

        public <D extends com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable> D toRepositoryDomain​(@NonNull
                                                                                                                     @NonNull Object businessDomain,
                                                                                                                     @NonNull
                                                                                                                     @NonNull Class<D> repositoryDomain)
      • toRepositoryDomain

        public <D extends com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable,​R extends com.broadleafcommerce.common.extension.DomainTypeAware> D toRepositoryDomain​(@NonNull
                                                                                                                                                                                            @NonNull Object businessDomain,
                                                                                                                                                                                            @NonNull
                                                                                                                                                                                            R repositoryDomain)
      • fromRepositoryDomain

        public <D extends com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable,​P> P fromRepositoryDomain​(@NonNull
                                                                                                                               D repositoryDomain,
                                                                                                                               @NonNull
                                                                                                                               @NonNull Class<P> businessDomain)
      • modifyMap

        public <D extends com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable,​P> D modifyMap​(@NonNull
                                                                                                                    D repositoryDomain,
                                                                                                                    @NonNull
                                                                                                                    P businessDomain,
                                                                                                                    boolean allowNull)
      • getToMeMapper

        protected <D extends com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable> org.modelmapper.ModelMapper getToMeMapper​(@NonNull
                                                                                                                                             D repositoryDomain,
                                                                                                                                             boolean allowNull)
      • modifyMap

        public <D extends com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable,​P> D modifyMap​(D domain,
                                                                                                                    P modifications)
        Equivalent to modifyMap(ModelMapperMappable, Object, boolean) with the boolean allowNull set to true.
        Type Parameters:
        D - The repository domain object
        P - The business domain object
        Parameters:
        domain - The domain to modify
        modifications - The modifications to apply
        Returns:
        The modified repository domain
      • fromRepositoryDomain

        public <D extends com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable & com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware,​P> P fromRepositoryDomain​(@NonNull
                                                                                                                                                                                                    D repositoryDomain)
      • fromRepositoryDomain

        public <D extends com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable & com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware,​P> List<P> fromRepositoryDomain​(@NonNull
                                                                                                                                                                                                          @NonNull List<D> repositoryDomains)
      • getMappers

        protected Map<String,​org.modelmapper.ModelMapper> getMappers()
      • getTypeFactory

        protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()