Class ODataBatchCallable


  • @VelocityCallable("singleton")
    public final class ODataBatchCallable
    extends Object
    • Constructor Detail

      • ODataBatchCallable

        public ODataBatchCallable()
    • Method Detail

      • execute

        public static String execute​(String p_strDataGroupGuid,
                                     String p_strJsonData)
                              throws Exception
        Creates and executes an OData batch request for the given datagroup. The JSON payload must conform to the format: [ "POST", {KeyFieldName:KeyValue, ...}, {DataFieldName:DataFieldValue, ...}, "MERGE", {KeyFieldName:KeyValue, ...}, {DataFieldName:DataFieldValue, ...}, ... ] DataFieldValue can be of type Edm.String, Edm.Int32 or Edm.Double. Each batch entry consists of three elements. First element of a triple denotes the request method (POST or MERGE), the second the key values and the last the field values.
        Parameters:
        p_strDataGroupGuid - The datagroup GUID.
        p_strJsonData - The JSON payload.
        Returns:
        The response body.
        Throws:
        Exception - If request failed.
      • execute

        public static String execute​(String p_strDataGroupGuid,
                                     String p_strJsonData,
                                     String p_strImpersonationUserGuid)
                              throws Exception
        Creates and executes an OData batch request for the given datagroup. The JSON payload must conform to the format: [ "POST", {KeyFieldName:KeyValue, ...}, {DataFieldName:DataFieldValue, ...}, "MERGE", {KeyFieldName:KeyValue, ...}, {DataFieldName:DataFieldValue, ...}, ... ] DataFieldValue can be of type Edm.String, Edm.Int32 or Edm.Double. Each batch entry consists of three elements. First element of a triple denotes the request method (only POST or MERGE are supported), the second the key values and the last the field values.
        Parameters:
        p_strDataGroupGuid - The datagroup GUID.
        p_strJsonData - The JSON payload.
        p_strImpersonationUserGuid - The optional impersonation user GUID.
        Returns:
        The response body.
        Throws:
        Exception - If request failed.