Class DtoConvertService

java.lang.Object
org.qubership.atp.mia.utils.converters.DtoConvertService

@Service public class DtoConvertService extends Object
  • Constructor Details

    • DtoConvertService

      public DtoConvertService()
  • Method Details

    • getModelMapper

      public org.modelmapper.ModelMapper getModelMapper()
      Get modelMapper for additional configurations.
      Returns:
      modelMapper.
    • convert

      public <T> T convert(Object from, Class<T> to)
      Convert t.
      Type Parameters:
      T - the type parameter
      Parameters:
      from - the from
      to - the to
      Returns:
      the t
    • convertList

      public <T> List<T> convertList(List from, Class<T> to)
      Convert list to list.
      Type Parameters:
      T - the type parameter
      Parameters:
      from - the from
      to - the to
      Returns:
      the set
    • convertSetToList

      public <T> List<T> convertSetToList(Set from, Class<T> to)
      Convert set to list.
      Type Parameters:
      T - the type parameter
      Parameters:
      from - the from
      to - the to
      Returns:
      the set