Class DefaultTuaEntityResourceNormalizer<SOURCE,TARGET extends ItemModel>

java.lang.Object
de.hybris.platform.tuawebservicesresources.normalizer.impl.DefaultTuaEntityResourceNormalizer<SOURCE,TARGET>
All Implemented Interfaces:
TuaEntityResourceNormalizer<SOURCE,TARGET>

public class DefaultTuaEntityResourceNormalizer<SOURCE,TARGET extends ItemModel> extends Object implements TuaEntityResourceNormalizer<SOURCE,TARGET>
Default implementation of TuaEntityResourceNormalizer
Since:
2208
  • Constructor Details

    • DefaultTuaEntityResourceNormalizer

      public DefaultTuaEntityResourceNormalizer(TuaGenericService tuaGenericService, Class<TARGET> targetClass, String targetTypeCode, ma.glasnost.orika.MapperFacade mapperFacade)
  • Method Details

    • normalizeEntity

      public TARGET normalizeEntity(SOURCE source, Map<String,String> searchParams, ma.glasnost.orika.MappingContext context, boolean createNewEntityIfNotExist)
      Description copied from interface: TuaEntityResourceNormalizer
      Retrieves or creates the model entity, updates it with data from the source DTO, and then saves the updated model.
      Specified by:
      normalizeEntity in interface TuaEntityResourceNormalizer<SOURCE,TARGET extends ItemModel>
      Parameters:
      source - the 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
    • getTuaGenericService

      protected TuaGenericService getTuaGenericService()
    • getTargetClass

      protected Class<TARGET> getTargetClass()
    • getTargetTypeCode

      protected String getTargetTypeCode()
    • getMapperFacade

      protected ma.glasnost.orika.MapperFacade getMapperFacade()