Class IdentityConverter

java.lang.Object
com.sap.cloud.sdk.s4hana.datamodel.odata.adapter.IdentityConverter
All Implemented Interfaces:
TypeConverter<Object,Object>

public class IdentityConverter extends Object implements TypeConverter<Object,Object>
Default implementation of the TypeConverter interface, returning all given objects unchanged.
  • Constructor Details

    • IdentityConverter

      public IdentityConverter()
  • Method Details

    • toDomain

      @Nonnull public ConvertedObject<Object> toDomain(@Nullable Object object)
      Description copied from interface: TypeConverter
      Transforms the given object to its domain-specific counterpart.
      Specified by:
      toDomain in interface TypeConverter<Object,Object>
      Parameters:
      object - The object to transform.
      Returns:
      A ConvertedObject wrapping the domain-specific object.
    • fromDomain

      @Nonnull public ConvertedObject<Object> fromDomain(@Nullable Object domainObject)
      Description copied from interface: TypeConverter
      Transforms the given domain-specific object to the general object.
      Specified by:
      fromDomain in interface TypeConverter<Object,Object>
      Parameters:
      domainObject - The domain-specific object to transform.
      Returns:
      A ConvertedObject wrapping the general object.
    • getType

      @Nonnull public Class<Object> getType()
      Description copied from interface: TypeConverter
      Getter for an class object of the type to convert from/to the domain-specific counterpart.
      Specified by:
      getType in interface TypeConverter<Object,Object>
      Returns:
      The class object of T.
    • getDomainType

      @Nonnull public Class<Object> getDomainType()
      Description copied from interface: TypeConverter
      Getter for an class object of the domain-specific type.
      Specified by:
      getDomainType in interface TypeConverter<Object,Object>
      Returns:
      The class object of DomainT.