org.jpox.store.rdbms.request
Class FetchRequest
java.lang.Object
org.jpox.store.rdbms.request.Request
org.jpox.store.rdbms.request.FetchRequest
public class FetchRequest
- extends Request
Class to retrieve a series of fields for an object of a class from the datastore.
All fields are retrieved in a single SELECT, selecting a candidate table (the most derived table
for which a field is required), and INNER JOINs to all superclass tables that are also required.
Any surrogate version stored in this table will be fetched *if* the object being updated doesnt
already have a value for it. If the caller wants the surrogate version to be updated then
they should nullify the "transactional" version before calling.
- Version:
- $Revision: 1.85 $
|
Constructor Summary |
FetchRequest(org.jpox.store.mapped.DatastoreClass classTable,
org.jpox.metadata.AbstractMemberMetaData[] fieldMetaData,
java.lang.Class cls,
org.jpox.ClassLoaderResolver clr)
Constructor, taking the table. |
|
Method Summary |
void |
execute(org.jpox.StateManager sm)
Method performing the retrieval of the record from the datastore. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FetchRequest
public FetchRequest(org.jpox.store.mapped.DatastoreClass classTable,
org.jpox.metadata.AbstractMemberMetaData[] fieldMetaData,
java.lang.Class cls,
org.jpox.ClassLoaderResolver clr)
- Constructor, taking the table. Uses the structure of the datastore table to build a basic query.
- Parameters:
classTable - The Class Table representing the datastore table to retrievefieldMetaData - MetaData of the fields to retrievecls - Class of objects being fetchedclr - ClassLoader resolver
execute
public void execute(org.jpox.StateManager sm)
- Method performing the retrieval of the record from the datastore.
Takes the constructed retrieval query and populates with the specific record information.
- Specified by:
execute in class Request
- Parameters:
sm - The state manager for the record to be retrieved
Copyright © -2008 . All Rights Reserved.