Class AbstractPopulatingConverter<SOURCE,TARGET>
- java.lang.Object
-
- de.hybris.platform.converters.impl.AbstractConverter<SOURCE,TARGET>
-
- de.hybris.platform.converters.impl.AbstractPopulatingConverter<SOURCE,TARGET>
-
- All Implemented Interfaces:
Populator<SOURCE,TARGET>,PopulatorList<SOURCE,TARGET>,Converter<SOURCE,TARGET>,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean,org.springframework.core.convert.converter.Converter<SOURCE,TARGET>
- Direct Known Subclasses:
AbstractContextualPopulatingConverter,AsnEntryModelPopulatingConverter,AsnModelPopulatingConverter,DefaultSolrProductSearchServiceTest.SearchQueryPageableConverter,DefaultSolrProductSearchServiceTest.SolrSearchRequestConverter,DefaultSolrProductSearchServiceTest.SolrSearchResponseConverter,FaultTolerantConverter,PointOfServiceDistanceConverter,TrackingEventToCsvDataConverter
public class AbstractPopulatingConverter<SOURCE,TARGET> extends AbstractConverter<SOURCE,TARGET> implements PopulatorList<SOURCE,TARGET>
Populating converter that uses a list of configured populators to populate the target during conversion. Class used to be but is no longer abstract. It allows to declare it as an abstract bean in Spring, otherwise we'd get BeanInstantiationException.
-
-
Constructor Summary
Constructors Constructor Description AbstractPopulatingConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<Populator<SOURCE,TARGET>>getPopulators()Get the list of populators.voidpopulate(SOURCE source, TARGET target)Populate the target instance from the source instance.voidremovePopulatorsDuplicates()voidsetPopulators(java.util.List<Populator<SOURCE,TARGET>> populators)Set the list of populators.-
Methods inherited from class de.hybris.platform.converters.impl.AbstractConverter
afterPropertiesSet, convert, convert, createFromClass, createTarget, getMyBeanName, setBeanName, setTargetClass
-
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.servicelayer.dto.converter.Converter
convertAll, convertAllIgnoreExceptions, getLogger
-
-
-
-
Method Detail
-
getPopulators
public java.util.List<Populator<SOURCE,TARGET>> getPopulators()
Description copied from interface:PopulatorListGet the list of populators.- Specified by:
getPopulatorsin interfacePopulatorList<SOURCE,TARGET>- Returns:
- the populators.
-
setPopulators
public void setPopulators(java.util.List<Populator<SOURCE,TARGET>> populators)
Description copied from interface:PopulatorListSet the list of populators.- Specified by:
setPopulatorsin interfacePopulatorList<SOURCE,TARGET>- Parameters:
populators- the populators
-
populate
public void populate(SOURCE source, TARGET target)
Populate the target instance from the source instance. Calls a list of injected populators to populate the instance.- Specified by:
populatein interfacePopulator<SOURCE,TARGET>- Specified by:
populatein classAbstractConverter<SOURCE,TARGET>- Parameters:
source- the source itemtarget- the target item to populate- See Also:
AbstractConverter.setTargetClass(Class)
-
removePopulatorsDuplicates
@PostConstruct public void removePopulatorsDuplicates()
-
-