Class LocateBulkRequest


  • public class LocateBulkRequest
    extends BulkRequest
    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 = ?
     
    • Constructor Summary

      Constructors 
      Constructor Description
      LocateBulkRequest​(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
      void execute​(org.datanucleus.state.DNStateManager[] sms)
      Method performing the location of the records in the datastore.
      protected java.lang.String getStatement​(DatastoreClass table, org.datanucleus.state.DNStateManager[] sms, boolean lock)  
      private org.datanucleus.state.DNStateManager[] processResults​(java.sql.ResultSet rs, org.datanucleus.state.DNStateManager[] sms)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • cmd

        org.datanucleus.metadata.AbstractClassMetaData cmd
      • clr

        org.datanucleus.ClassLoaderResolver clr
      • mappingDefinitions

        private StatementClassMapping[] mappingDefinitions
        Definition of input mappings in the SQL statement.
    • Constructor Detail

      • 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 retrieve
        cmd - Metadata for the class whose objects we are locating
        clr - ClassLoader resolver
    • Method Detail

      • getStatement

        protected java.lang.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 class BulkRequest
        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​(java.sql.ResultSet rs,
                                                                      org.datanucleus.state.DNStateManager[] sms)
                                                               throws java.sql.SQLException
        Throws:
        java.sql.SQLException