Class TypeConverterUtils
java.lang.Object
com.sap.cds.adapter.odata.v4.utils.TypeConverterUtils
Utils to map Olingo types to CAP Java types and vice versa.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Object
convertToType
(EdmType type, String value) Converts a String value to the correct Java value, based on the EdmTypestatic Object
getValueBasedOnTypeOfRequestPayload
(String typeName, Object value) This method converts input payload to correct Java Types for types Guid, DateTime, Date and Time The handlers will get the new java Date Time types because of this conversionstatic Object
getValueBasedOnTypeOfResultSet
(EdmType type, Object value) This method converts the result from db to correct Java Type required by Olingo serializers for types Guid, DateTime, Date and Time
-
Method Details
-
convertToType
Converts a String value to the correct Java value, based on the EdmType- Parameters:
type
- the EdmTypevalue
- the string value- Returns:
- the value in the correct Java type
-
getValueBasedOnTypeOfResultSet
This method converts the result from db to correct Java Type required by Olingo serializers for types Guid, DateTime, Date and Time- Parameters:
type
- EdmTypevalue
- Value- Returns:
- java Object
-
getValueBasedOnTypeOfRequestPayload
This method converts input payload to correct Java Types for types Guid, DateTime, Date and Time The handlers will get the new java Date Time types because of this conversion- Parameters:
typeName
- edmTypeNamevalue
- Value- Returns:
- java Object
-