Class ResultSetProcessor
java.lang.Object
com.sap.cds.adapter.odata.v2.processors.response.ResultSetProcessor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectgetReturnValueOfFunction(EdmFunctionImport functionImport, List<Map<String, Object>> data) postProcessResponsePayload(EdmType edmType, com.sap.cds.Result result, Map<String, ODataCallback> callbacks, URI baseUri) Certain primitive types like string UUID, Time, DateTime, DateTimeOffset and Date have to be converted to UUID, java.sql.Time, java.util.GregorianCalendar, java.sql.Date since Olingo V2 does not support Java8 date and Time data types.postProcessResponsePayload(EdmType edmType, com.sap.cds.Result result, Map<String, ODataCallback> callbacks, URI baseUri, boolean generateID, boolean deferredExpand) Certain primitive types like string UUID, Time, DateTime, DateTimeOffset and Date have to be converted to UUID, java.sql.Time, java.util.GregorianCalendar, java.sql.Date since Olingo V2 does not support Java8 date and Time data types.static StringresultToString(com.sap.cds.Result result) static <T> TrowToSingleValue(Optional<com.sap.cds.Row> row, Class<T> type)
-
Constructor Details
-
ResultSetProcessor
public ResultSetProcessor()
-
-
Method Details
-
postProcessResponsePayload
public static List<Map<String,Object>> postProcessResponsePayload(EdmType edmType, com.sap.cds.Result result, Map<String, ODataCallback> callbacks, URI baseUri) Certain primitive types like string UUID, Time, DateTime, DateTimeOffset and Date have to be converted to UUID, java.sql.Time, java.util.GregorianCalendar, java.sql.Date since Olingo V2 does not support Java8 date and Time data types. Also, the conversion should happen for parent entity + all levels of child entity- Parameters:
edmType- EdmTyperesult- Resultcallbacks- Map of String, ODataCallbackbaseUri- URI- Returns:
- List of Maps or List of Objects
-
postProcessResponsePayload
public static List<Map<String,Object>> postProcessResponsePayload(EdmType edmType, com.sap.cds.Result result, Map<String, ODataCallback> callbacks, URI baseUri, boolean generateID, boolean deferredExpand) Certain primitive types like string UUID, Time, DateTime, DateTimeOffset and Date have to be converted to UUID, java.sql.Time, java.util.GregorianCalendar, java.sql.Date since Olingo V2 does not support Java8 date and Time data types. Also, the conversion should happen for parent entity + all levels of child entity- Parameters:
edmType- EdmTyperesult- Resultcallbacks- Map of String, ODataCallbackbaseUri- URIgenerateID- in case of aggregate entities, if true, generate corresponding response IDdeferredExpand- defer loading of navigation properties which are not in expand list- Returns:
- List of Maps or List of Objects
-
resultToString
-
rowToMap
-
rowToSingleValue
-
getReturnValueOfFunction
public static Object getReturnValueOfFunction(EdmFunctionImport functionImport, List<Map<String, Object>> data) throws EdmException- Throws:
EdmException
-