org.datanucleus.store.rdbms.request
Class DeleteRequest

java.lang.Object
  extended by org.datanucleus.store.rdbms.request.Request
      extended by org.datanucleus.store.rdbms.request.DeleteRequest

public class DeleteRequest
extends Request

Class to provide a means of deletion of records from a data store. Extends basic request class implementing the execute method to do a JDBC delete operation. Provides a version check for optimistic handling.


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
DeleteRequest(org.datanucleus.store.mapped.DatastoreClass table, java.lang.Class cls, org.datanucleus.ClassLoaderResolver clr)
          Constructor, taking the table.
 
Method Summary
 void execute(org.datanucleus.StateManager sm)
          Method performing the deletion of the record from the datastore.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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(org.datanucleus.store.mapped.DatastoreClass table,
                     java.lang.Class cls,
                     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.
cls - Class of objects being deleted
clr - ClassLoader resolver
Method Detail

execute

public void execute(org.datanucleus.StateManager sm)
Method performing the deletion of the record from the datastore. Takes the constructed deletion query and populates with the specific record information.

Specified by:
execute in class Request
Parameters:
sm - The state manager for the record to be deleted.


Copyright © 2009. All Rights Reserved.