|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.rdbms.request.Request
org.datanucleus.store.rdbms.request.UpdateRequest
public class UpdateRequest
Class to provide a means of update of records in a data store. Extends basic request class implementing the execute method to do a JDBC update operation.
| Field Summary | |
|---|---|
protected org.datanucleus.metadata.AbstractClassMetaData |
cmd
MetaData for the class. |
protected boolean |
versionChecks
Whether we should make checks on optimistic version before updating. |
protected org.datanucleus.metadata.VersionMetaData |
versionMetaData
MetaData for the version handling. |
| Fields inherited from class org.datanucleus.store.rdbms.request.Request |
|---|
key, LOCALISER, table |
| Constructor Summary | |
|---|---|
UpdateRequest(org.datanucleus.store.mapped.DatastoreClass table,
org.datanucleus.metadata.AbstractMemberMetaData[] reqFieldMetaData,
org.datanucleus.metadata.AbstractClassMetaData cmd,
org.datanucleus.ClassLoaderResolver clr)
Constructor, taking the table. |
|
| Method Summary | |
|---|---|
void |
execute(org.datanucleus.store.ObjectProvider sm)
Method performing the update of the record in the datastore. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.datanucleus.metadata.AbstractClassMetaData cmd
protected org.datanucleus.metadata.VersionMetaData versionMetaData
protected boolean versionChecks
| Constructor Detail |
|---|
public UpdateRequest(org.datanucleus.store.mapped.DatastoreClass table,
org.datanucleus.metadata.AbstractMemberMetaData[] reqFieldMetaData,
org.datanucleus.metadata.AbstractClassMetaData cmd,
org.datanucleus.ClassLoaderResolver clr)
UPDATE table-name SET param1=?,param2=? WHERE id1=? AND id2=?or (when also performing version checks)
UPDATE table-name SET param1=?,param2=?,version={newvers} WHERE id1=? AND id2=? AND version={oldvers}
table - The Class Table representing the datastore table to updatereqFieldMetaData - MetaData of the fields to updatecmd - ClassMetaData of objects being updatedclr - ClassLoader resolver| Method Detail |
|---|
public void execute(org.datanucleus.store.ObjectProvider sm)
execute in class Requestsm - The state manager for the record to be updated
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||