org.jpox.store.rdbms.request
Class UpdateRequest

java.lang.Object
  extended byorg.jpox.store.rdbms.request.Request
      extended byorg.jpox.store.rdbms.request.UpdateRequest

public class UpdateRequest
extends Request

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.

Version:
$Revision: 1.45 $

Field Summary
 
Fields inherited from class org.jpox.store.rdbms.request.Request
key, LOCALISER, table
 
Constructor Summary
UpdateRequest(DatastoreClass table, AbstractPropertyMetaData[] reqFieldMetaData, java.lang.Class cls, ClassLoaderResolver clr)
          Constructor, taking the table.
 
Method Summary
 void execute(StateManager sm)
          Method performing the update of the record in the datastore.
 
Methods inherited from class org.jpox.store.rdbms.request.Request
executeQuery, executeUpdate, replaceParamPlaceholdersWithValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdateRequest

public UpdateRequest(DatastoreClass table,
                     AbstractPropertyMetaData[] reqFieldMetaData,
                     java.lang.Class cls,
                     ClassLoaderResolver clr)
Constructor, taking the table. Uses the structure of the datastore table to build a basic query. The query will be of the form
 UPDATE table-name
 SET param1=?,param2=?
 WHERE param3=? AND param4=?

Parameters:
table - The Class Table representing the datastore table to update
reqFieldMetaData - MetaData of the fields to update
cls - Class of objects being updated
clr - ClassLoader resolver
Method Detail

execute

public void execute(StateManager sm)
Method performing the update of the record in the datastore. Takes the constructed update query and populates with the specific record information.

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


Copyright © -2007 . All Rights Reserved.