Class TypeConverterUtils
java.lang.Object
com.sap.cds.adapter.odata.v2.utils.TypeConverterUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectconvertToType(EdmType type, String value) Convert string value of EdmType to a corresponding java type.static ObjectgetValueBasedOnTypeOfRequestPayload(EdmType type, EdmAnnotatable property, Object value) Convert value of EdmType to a corresponding java type supported by CDS4J library.static ObjectgetValueBasedOnTypeOfResultSet(EdmType type, Object value) Convert value of EdmType to a corresponding java type supported by Olingo library.
-
Method Details
-
convertToType
Convert string value of EdmType to a corresponding java type. Used for conversion of filter values.- Parameters:
type- Edm Typevalue- string representation of a value- Returns:
- Object
-
getValueBasedOnTypeOfResultSet
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 Typevalue- 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 Typevalue- string representation of a value- Returns:
- Object
-