Class LocateBulkRequest
java.lang.Object
org.datanucleus.store.rdbms.request.BulkRequest
org.datanucleus.store.rdbms.request.LocateBulkRequest
Request to locate a series of records in the data store (all present in the same table).
Performs an SQL statement like
SELECT ID [,FIELD1,FIELD2] FROM CANDIDATE_TABLE WHERE ID = ? OR ID = ? OR ID = ?
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) org.datanucleus.ClassLoaderResolver
(package private) org.datanucleus.metadata.AbstractClassMetaData
private StatementClassMapping[]
Definition of input mappings in the SQL statement.private StatementClassMapping
Result mapping for the SQL statement.Fields inherited from class org.datanucleus.store.rdbms.request.BulkRequest
key, table
-
Constructor Summary
ConstructorsConstructorDescriptionLocateBulkRequest
(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[] sms) Method performing the location of the records in the datastore.protected String
getStatement
(DatastoreClass table, org.datanucleus.state.DNStateManager[] sms, boolean lock) private org.datanucleus.state.DNStateManager[]
processResults
(ResultSet rs, org.datanucleus.state.DNStateManager[] sms)
-
Field Details
-
cmd
org.datanucleus.metadata.AbstractClassMetaData cmd -
clr
org.datanucleus.ClassLoaderResolver clr -
mappingDefinitions
Definition of input mappings in the SQL statement. -
resultMapping
Result mapping for the SQL statement.
-
-
Constructor Details
-
LocateBulkRequest
public LocateBulkRequest(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 whose objects we are locatingclr
- ClassLoader resolver
-
-
Method Details
-
getStatement
protected String getStatement(DatastoreClass table, org.datanucleus.state.DNStateManager[] sms, boolean lock) -
execute
public void execute(org.datanucleus.state.DNStateManager[] sms) Method performing the location of the records in the datastore.- Specified by:
execute
in classBulkRequest
- Parameters:
sms
- StateManagers to be located- Throws:
org.datanucleus.exceptions.NucleusObjectNotFoundException
- with nested exceptions for each of missing objects (if any)
-
processResults
private org.datanucleus.state.DNStateManager[] processResults(ResultSet rs, org.datanucleus.state.DNStateManager[] sms) throws SQLException - Throws:
SQLException
-