Hello,
what is the best way to realize "Optimistic Concurrency" at >SQL Datasource<.
I don't no where and how i can manipulate the sql where condition with oldValue.
1) I cant find the "where condition" in com.isomorphic.datasource.DSRequest (see javaclass)
2) I cant find a equivalent to $values like $oldvalues for <whereClause> in DS
I tried
..ds.xml
and javaclass:
with smartGWTee 2.2 eval and >SQL Datasource<
Thanks for your help.
Cheers
what is the best way to realize "Optimistic Concurrency" at >SQL Datasource<.
I don't no where and how i can manipulate the sql where condition with oldValue.
1) I cant find the "where condition" in com.isomorphic.datasource.DSRequest (see javaclass)
2) I cant find a equivalent to $values like $oldvalues for <whereClause> in DS
I tried
..ds.xml
Code:
<operationBinding operationType="update"> <serverObject className="com.payfits.server.ds.DataSourceAccess" lookupStyle="new" /> <serverMethod>updateRecord</serverMethod> </operationBinding>
Code:
public DSResponse updateRecord(DSRequest dsRequest, HttpServletRequest servletRequest) throws Exception {
//where can i manipulate the sql "where conditions"???
dsRequest.getOldValues().get("technicalfieldlastupdate");
//Call Database
DSResponse response = dsRequest.execute();
// no row update, means a OptimisticLockException
if (response.getAffectedRows() == 0) {
response.addError("technicalfieldlastupdate", "OptimisticLockException!!!!");
response.setProperty("technicalfieldlastupdate", "OptimisticLockException!!!!");
response.setFailure();
}
return response;
}
Thanks for your help.
Cheers
Comment