Class MappingUtil

java.lang.Object
overit.geocallapp.wfm.core.soap.utils.MappingUtil

public class MappingUtil extends Object
  • Method Details

    • mapToObject

      public static <T> T mapToObject(Object sourceObject, Class<T> destinationClass, String mapperConfigFile) throws DAValidateException, DAException
      Maps an object into another using a mapper and a configuration file.
      Type Parameters:
      T - destination object type
      Parameters:
      sourceObject - source object
      destinationClass - destination object class
      mapperConfigFile - configuration file used by the mapper
      Returns:
      a destination object initialized with source fields
      Throws:
      DAValidateException - if mapping process fails with a validation error
      DAException - if mapping process fails with an unexpected error