Class LocateRequest
java.lang.Object
org.datanucleus.store.rdbms.request.Request
org.datanucleus.store.rdbms.request.LocateRequest
Request to locate a record in the data store. Performs an SQL statement like
SELECT 1 FROM CANDIDATE_TABLE WHERE ID = ?and checks if the ResultSet is empty
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StatementClassMapping
Definition of mappings in the SQL statement.private String
JDBC locate statement with locking.private String
JDBC locate statement without locking. -
Constructor Summary
ConstructorsConstructorDescriptionLocateRequest
(DatastoreClass table, org.datanucleus.metadata.AbstractClassMetaData cmd, org.datanucleus.ClassLoaderResolver clr) Constructor, taking the table. -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute
(org.datanucleus.state.DNStateManager sm) Method performing the retrieval of the record from the datastore.
-
Field Details
-
statementUnlocked
JDBC locate statement without locking. -
statementLocked
JDBC locate statement with locking. -
mappingDefinition
Definition of mappings in the SQL statement.
-
-
Constructor Details
-
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
-
-
Method Details
-
execute
public void execute(org.datanucleus.state.DNStateManager sm) Method performing the retrieval of the record from the datastore. Takes the constructed retrieval query and populates with the specific record information.
-