Class ConversionHelper
- java.lang.Object
-
- de.hybris.platform.servicelayer.dto.converter.ConversionHelper
-
public final class ConversionHelper extends java.lang.ObjectHelper class for copying properties between objects.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <SRC,DEST,COLL extends java.util.Collection<DEST>>
COLLconvertAll(java.util.Collection<SRC> src, Converter<SRC,DEST> converter, COLL target)static voidcopyProperties(java.lang.Object source, java.lang.Object target)Copies the property from the source object (bean) to the target object (bean).
-
-
-
Method Detail
-
copyProperties
public static void copyProperties(java.lang.Object source, java.lang.Object target) throws ConversionExceptionCopies the property from the source object (bean) to the target object (bean).- Throws:
ConversionException
-
convertAll
public static <SRC,DEST,COLL extends java.util.Collection<DEST>> COLL convertAll(java.util.Collection<SRC> src, Converter<SRC,DEST> converter, COLL target)- Parameters:
src- a collection with the source elements which will be convertedconverter- the converter which transforms a single element from the source type into an element of the target typetarget- this collection contains the transformed elements from the source collection- Returns:
- the parameter
targetwith the converted elements.
-
-