Class TypeConverterUtils

java.lang.Object
com.sap.cds.adapter.odata.v2.utils.TypeConverterUtils

public class TypeConverterUtils extends Object
  • Method Details

    • convertToType

      public static Object convertToType(EdmType type, String value)
      Convert string value of EdmType to a corresponding java type. Used for conversion of filter values.
      Parameters:
      type - Edm Type
      value - string representation of a value
      Returns:
      Object
    • getValueBasedOnTypeOfResultSet

      public static Object getValueBasedOnTypeOfResultSet(EdmType type, Object value)
      Convert value of EdmType to a corresponding java type supported by Olingo library. This is used for type conversion of a response.
      Parameters:
      type - Edm Type
      value - string representation of a value
      Returns:
      Object
    • getValueBasedOnTypeOfRequestPayload

      public static Object getValueBasedOnTypeOfRequestPayload(EdmType type, EdmAnnotatable property, Object value)
      Convert value of EdmType to a corresponding java type supported by CDS4J library. This is used for type conversion of a request payload.
      Parameters:
      type - Edm Type
      value - string representation of a value
      Returns:
      Object