Class DefaultConfigurableConverter<SOURCE,TARGET,OPTION>
- java.lang.Object
-
- de.hybris.platform.personalizationfacades.converters.impl.DefaultConfigurableConverter<SOURCE,TARGET,OPTION>
-
- All Implemented Interfaces:
ConfigurablePopulator<SOURCE,TARGET,OPTION>,ConfigurableConverter<SOURCE,TARGET,OPTION>,Converter<SOURCE,TARGET>,org.springframework.core.convert.converter.Converter<SOURCE,TARGET>
- Direct Known Subclasses:
DefaultConfigurableSubtypeConverter
public class DefaultConfigurableConverter<SOURCE,TARGET,OPTION> extends java.lang.Object implements ConfigurableConverter<SOURCE,TARGET,OPTION>, ConfigurablePopulator<SOURCE,TARGET,OPTION>
-
-
Constructor Summary
Constructors Constructor Description DefaultConfigurableConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TARGETconvert(SOURCE source, TARGET target, java.util.Collection<OPTION> options)Converts a SOURCE object into a TARGET object using provided Options.java.util.Collection<OPTION>getDefaultOptions()Getting default optionsprotected java.util.Map<OPTION,Populator<SOURCE,TARGET>>getPopulators()java.lang.Class<TARGET>getTargetClass()TARGETgetTargetInstance()TARGETgetTargetInstance(SOURCE source)Getting target instance of source objectvoidpopulate(SOURCE source, TARGET target, java.util.Collection<OPTION> options)Populate the target instance from the source instance.voidsetDefaultOptions(java.util.Collection<OPTION> defaultOptions)voidsetPopulators(java.util.Map<OPTION,Populator<SOURCE,TARGET>> populators)voidsetTargetClass(java.lang.Class<TARGET> targetClass)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.hybris.platform.personalizationfacades.converters.ConfigurableConverter
convert, convert, convert, convertAll, convertAll
-
Methods inherited from interface de.hybris.platform.servicelayer.dto.converter.Converter
convertAll, convertAllIgnoreExceptions, getLogger
-
-
-
-
Method Detail
-
convert
public TARGET convert(SOURCE source, TARGET target, java.util.Collection<OPTION> options)
Description copied from interface:ConfigurableConverterConverts a SOURCE object into a TARGET object using provided Options.- Specified by:
convertin interfaceConfigurableConverter<SOURCE,TARGET,OPTION>- Parameters:
source- - the source objecttarget- - the target objectoptions- - the collection of convert options- Returns:
- the TARGET object
-
populate
public void populate(SOURCE source, TARGET target, java.util.Collection<OPTION> options)
Description copied from interface:ConfigurablePopulatorPopulate the target instance from the source instance. The collection of options is used to control what data is populated.- Specified by:
populatein interfaceConfigurablePopulator<SOURCE,TARGET,OPTION>- Parameters:
source- the source objecttarget- the target to filloptions- options used to control what data is populated
-
getTargetInstance
public TARGET getTargetInstance(SOURCE source)
Description copied from interface:ConfigurableConverterGetting target instance of source object- Specified by:
getTargetInstancein interfaceConfigurableConverter<SOURCE,TARGET,OPTION>- Parameters:
source- - the source object- Returns:
- the TARGET object
-
getTargetInstance
public TARGET getTargetInstance()
-
setTargetClass
public void setTargetClass(java.lang.Class<TARGET> targetClass)
-
getTargetClass
public java.lang.Class<TARGET> getTargetClass()
-
setDefaultOptions
public void setDefaultOptions(java.util.Collection<OPTION> defaultOptions)
-
getDefaultOptions
public java.util.Collection<OPTION> getDefaultOptions()
Description copied from interface:ConfigurableConverterGetting default options- Specified by:
getDefaultOptionsin interfaceConfigurableConverter<SOURCE,TARGET,OPTION>- Returns:
- the Collection of Options
-
-