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 Summary
ConstructorsConstructorDescriptionDefaultTuaEntityResourceNormalizer(TuaGenericService tuaGenericService, Class<TARGET> targetClass, String targetTypeCode, ma.glasnost.orika.MapperFacade mapperFacade) -
Method Summary
Modifier and TypeMethodDescriptionprotected ma.glasnost.orika.MapperFacadeprotected Stringprotected TuaGenericServicenormalizeEntity(SOURCE source, Map<String, String> searchParams, ma.glasnost.orika.MappingContext context, boolean createNewEntityIfNotExist) Retrieves or creates the model entity, updates it with data from the source DTO, and then saves the updated model.
-
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:TuaEntityResourceNormalizerRetrieves or creates the model entity, updates it with data from the source DTO, and then saves the updated model.- Specified by:
normalizeEntityin interfaceTuaEntityResourceNormalizer<SOURCE,TARGET extends ItemModel> - Parameters:
source- the DTOsearchParams- 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
-
getTargetClass
-
getTargetTypeCode
-
getMapperFacade
protected ma.glasnost.orika.MapperFacade getMapperFacade()
-