Class ConversionHelper

java.lang.Object
de.hybris.platform.servicelayer.dto.converter.ConversionHelper

public final class ConversionHelper extends Object
Helper class for copying properties between objects.
  • Method Details

    • copyProperties

      public static void copyProperties(Object source, Object target) throws ConversionException
      Copies the property from the source object (bean) to the target object (bean).
      Throws:
      ConversionException
    • convertAll

      public static <SRC, DEST, COLL extends Collection<DEST>> COLL convertAll(Collection<SRC> src, Converter<SRC,DEST> converter, COLL target)
      Converts with the given Converter elements of the given collection src into the collection target.
      Parameters:
      src - a collection with the source elements which will be converted
      converter - the converter which transforms a single element from the source type into an element of the target type
      target - this collection contains the transformed elements from the source collection
      Returns:
      the parameter target with the converted elements.