Class ODataBatchCallable
- java.lang.Object
-
- de.uplanet.lucy.server.auxiliaries.odata.ODataBatchCallable
-
@VelocityCallable("singleton") public final class ODataBatchCallable extends Object
-
-
Constructor Summary
Constructors Constructor Description ODataBatchCallable()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
execute(String p_strDataGroupGuid, String p_strJsonData)
Creates and executes an OData batch request for the given datagroup.static String
execute(String p_strDataGroupGuid, String p_strJsonData, String p_strImpersonationUserGuid)
Creates and executes an OData batch request for the given datagroup.
-
-
-
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.
-
-