Class DefaultTmaEntityResourceNormalizer<SOURCE,TARGET extends ItemModel>

java.lang.Object
de.hybris.platform.b2ctelcofacades.normalizer.impl.DefaultTmaEntityResourceNormalizer<SOURCE,TARGET>
All Implemented Interfaces:
TmaEntityResourceNormalizer<SOURCE,TARGET>

public class DefaultTmaEntityResourceNormalizer<SOURCE,TARGET extends ItemModel> extends Object implements TmaEntityResourceNormalizer<SOURCE,TARGET>
Default implementation of TmaEntityResourceNormalizer
Since:
2205
  • Constructor Details

    • DefaultTmaEntityResourceNormalizer

      public DefaultTmaEntityResourceNormalizer(TmaGenericItemService tmaGenericItemService, de.hybris.platform.servicelayer.dto.converter.Converter<SOURCE,TARGET> reverseConverter, Class<TARGET> targetClass, String targetTypeCode)
  • Method Details

    • normalizeEntity

      public TARGET normalizeEntity(SOURCE source, Map<String,String> searchParams, boolean createNewEntityIfNotExist)
      Description copied from interface: TmaEntityResourceNormalizer
      Retrieves or creates the model entity, updates it with data from the source facade DTO, and then saves the updated model.
      Specified by:
      normalizeEntity in interface TmaEntityResourceNormalizer<SOURCE,TARGET extends ItemModel>
      Parameters:
      source - the facade DTO
      searchParams - the parameters used for retrieving the item model.
      createNewEntityIfNotExist - if the entity does not exist and this is set to true it will create the model, otherwise throw an exception.
      Returns:
      the updated ItemModel
    • getTmaGenericItemService

      protected TmaGenericItemService getTmaGenericItemService()
    • getReverseConverter

      protected de.hybris.platform.servicelayer.dto.converter.Converter<SOURCE,TARGET> getReverseConverter()
    • getTargetClass

      protected Class<TARGET> getTargetClass()
    • getTargetTypeCode

      protected String getTargetTypeCode()