Class DeleteRequest
- java.lang.Object
-
- org.datanucleus.store.rdbms.request.Request
-
- org.datanucleus.store.rdbms.request.DeleteRequest
-
public class DeleteRequest extends Request
Class to provide a means of deletion of records from an RDBMS. Extends basic request class implementing the execute method to do a JDBC delete operation. Provides a version check for optimistic handling. The SQL will be of the formDELETE FROM TBL_NAME WHERE id1=? AND id2=?
or, if "soft delete" is being used for this type, thenUPDATE TBL_NAME SET DELETE_COL=TRUE WHERE id1=? AND id2=?
-
-
Field Summary
Fields Modifier and Type Field Description protected org.datanucleus.metadata.AbstractClassMetaDatacmdMetaData for the class.protected booleanversionChecksWhether we should make checks on optimistic version before updating.protected org.datanucleus.metadata.VersionMetaDataversionMetaDataMetaData for the version handling.
-
Constructor Summary
Constructors Constructor Description DeleteRequest(DatastoreClass table, org.datanucleus.metadata.AbstractClassMetaData cmd, org.datanucleus.ClassLoaderResolver clr)Constructor, taking the table.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute(org.datanucleus.state.DNStateManager sm)Method performing the deletion of the record from the datastore.
-
-
-
Field Detail
-
cmd
protected org.datanucleus.metadata.AbstractClassMetaData cmd
MetaData for the class.
-
versionMetaData
protected org.datanucleus.metadata.VersionMetaData versionMetaData
MetaData for the version handling.
-
versionChecks
protected boolean versionChecks
Whether we should make checks on optimistic version before updating.
-
-
Constructor Detail
-
DeleteRequest
public DeleteRequest(DatastoreClass table, org.datanucleus.metadata.AbstractClassMetaData cmd, org.datanucleus.ClassLoaderResolver clr)
Constructor, taking the table. Uses the structure of the datastore table to build a basic query.- Parameters:
table- The Class Table representing the datastore table to delete.cmd- ClassMetaData of objects being deletedclr- ClassLoader resolver
-
-