Class LocateRequest
- java.lang.Object
-
- org.datanucleus.store.rdbms.request.Request
-
- org.datanucleus.store.rdbms.request.LocateRequest
-
public class LocateRequest extends Request
Request to locate a record in the data store. Performs an SQL statement likeSELECT 1 FROM CANDIDATE_TABLE WHERE ID = ?
and checks if the ResultSet is empty
-
-
Field Summary
Fields Modifier and Type Field Description private StatementClassMappingmappingDefinitionDefinition of mappings in the SQL statement.private java.lang.StringstatementLockedJDBC locate statement with locking.private java.lang.StringstatementUnlockedJDBC locate statement without locking.
-
Constructor Summary
Constructors Constructor Description LocateRequest(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 retrieval of the record from the datastore.
-
-
-
Field Detail
-
statementUnlocked
private java.lang.String statementUnlocked
JDBC locate statement without locking.
-
statementLocked
private java.lang.String statementLocked
JDBC locate statement with locking.
-
mappingDefinition
private StatementClassMapping mappingDefinition
Definition of mappings in the SQL statement.
-
-
Constructor Detail
-
LocateRequest
public LocateRequest(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 retrievecmd- Metadata for the class we are locating an instance ofclr- ClassLoader resolver
-
-