Class ResultSetProcessor

java.lang.Object
com.sap.cds.adapter.odata.v2.processors.response.ResultSetProcessor

public class ResultSetProcessor extends Object
  • 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 - EdmType
      result - Result
      callbacks - Map of String, ODataCallback
      baseUri - 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 - EdmType
      result - Result
      callbacks - Map of String, ODataCallback
      baseUri - URI
      generateID - in case of aggregate entities, if true, generate corresponding response ID
      deferredExpand - defer loading of navigation properties which are not in expand list
      Returns:
      List of Maps or List of Objects
    • resultToString

      public static String resultToString(com.sap.cds.Result result)
    • rowToMap

      public static Map<String,Object> rowToMap(Optional<com.sap.cds.Row> row)
    • rowToSingleValue

      public static <T> T rowToSingleValue(Optional<com.sap.cds.Row> row, Class<T> type)
    • getReturnValueOfFunction

      public static Object getReturnValueOfFunction(EdmFunctionImport functionImport, List<Map<String,Object>> data) throws EdmException
      Throws:
      EdmException