className: the name of class as created using the workbench
(correspond to the table)
id:
attrName:
value:
auditMsg:
Sample Code
String className ="shared.common.product";String id ="12";String attrName ="price";Integer value =700;Object res =DSApi.update(className, id, attrName, value);
Returns
UpdateMany
Update many records at a time. The class name is provided that indirectly represents a table.
className: the name of class as created using the workbench
(correspond to the table)
ids: rows needed to be modified
attrName: the name of the column
value: the value of inside the column for the specific row
auditMsg: any informational message
Sample Code
String className ="shared.common.product";List<String> ids =newArrayList<>();ids.add("12");ids.add("15");String attrName ="price";Integer value =700;Object res =DSApi.updateMany(className, ids, attrName, value);
Returns
UpdateByQuery
Update by executing a query on the table. it takes partial query which is the embellished with where clauses.
className: the name of class as created using the workbench
(correspond to the table)
query: represents the filtering criteria
updateAttrs: update map for the attributes
auditMsg: informational message
Sample Code
String className ="shared.common.product";Map<String,Object> updateParam =newHashMap<>();updateParam.put("deleted",true);Object res =DSApi.updateByQuery(className,"", updateParam);
Returns
executeSqlWriteStatement
Execute a stored procedure or SQL string. The statement is prepared for execution. Use this method when you're specifying the full statement.