Interface ConfigurableConverter<SOURCE,TARGET,OPTION>
-
- Type Parameters:
SOURCE- the type of the source objectTARGET- the type of the destination objectOPTION- the type of the options list
- All Superinterfaces:
Converter<SOURCE,TARGET>,org.springframework.core.convert.converter.Converter<SOURCE,TARGET>
- All Known Subinterfaces:
ConfigurableSubtypeConverter<SOURCE,TARGET,OPTION>
- All Known Implementing Classes:
DefaultConfigurableConverter,DefaultConfigurableSubtypeAwareConverter,DefaultConfigurableSubtypeConverter
public interface ConfigurableConverter<SOURCE,TARGET,OPTION> extends Converter<SOURCE,TARGET>
Interface for a configurable converter. The collection of options is used to control what data is populated.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default TARGETconvert(SOURCE source)Converts the source object, creating a new instance of the destination typedefault TARGETconvert(SOURCE source, java.util.Collection<OPTION> options)Converts a SOURCE object into a TARGET object using provided Options.default TARGETconvert(SOURCE source, TARGET prototype)Convert the source object by filling the prototypeTARGETconvert(SOURCE source, TARGET target, java.util.Collection<OPTION> options)Converts a SOURCE object into a TARGET object using provided Options.default java.util.List<TARGET>convertAll(java.util.Collection<? extends SOURCE> sources, java.util.Collection<OPTION> options)Converts a Collection of SOURCE objects into a List of TARGET objects using provided as Collection Options.default java.util.List<TARGET>convertAll(java.util.Collection<? extends SOURCE> sources, OPTION... options)Converts a Collection SOURCE objects into a List of TARGET objects using provided as array Options.java.util.Collection<OPTION>getDefaultOptions()Getting default optionsTARGETgetTargetInstance(SOURCE source)Getting target instance of source object-
Methods inherited from interface de.hybris.platform.servicelayer.dto.converter.Converter
convertAll, convertAllIgnoreExceptions, getLogger
-
-
-
-
Method Detail
-
convert
default TARGET convert(SOURCE source)
Description copied from interface:ConverterConverts the source object, creating a new instance of the destination type
-
convert
default TARGET convert(SOURCE source, TARGET prototype)
Description copied from interface:ConverterConvert the source object by filling the prototype
-
convert
default TARGET convert(SOURCE source, java.util.Collection<OPTION> options)
Converts a SOURCE object into a TARGET object using provided Options.- Parameters:
source- - the source objectoptions- - the collection of convert options- Returns:
- the TARGET object
- Throws:
ConversionException- when an error occurs during the conversion process
-
convert
TARGET convert(SOURCE source, TARGET target, java.util.Collection<OPTION> options)
Converts a SOURCE object into a TARGET object using provided Options.- Parameters:
source- - the source objecttarget- - the target objectoptions- - the collection of convert options- Returns:
- the TARGET object
- Throws:
ConversionException- when an error occurs during the conversion process
-
convertAll
default java.util.List<TARGET> convertAll(java.util.Collection<? extends SOURCE> sources, OPTION... options)
Converts a Collection SOURCE objects into a List of TARGET objects using provided as array Options.- Parameters:
sources- - the source objectsoptions- - the array of convert options- Returns:
- the List of TARGET objects
- Throws:
ConversionException- when an error occurs during the conversion process
-
convertAll
default java.util.List<TARGET> convertAll(java.util.Collection<? extends SOURCE> sources, java.util.Collection<OPTION> options)
Converts a Collection of SOURCE objects into a List of TARGET objects using provided as Collection Options.- Parameters:
sources- - the source objectsoptions- - the array of convert options- Returns:
- the List of TARGET objects
- Throws:
ConversionException- when an error occurs during the conversion process
-
getTargetInstance
TARGET getTargetInstance(SOURCE source)
Getting target instance of source object- Parameters:
source- - the source object- Returns:
- the TARGET object
-
getDefaultOptions
java.util.Collection<OPTION> getDefaultOptions()
Getting default options- Returns:
- the Collection of Options
-
-