Class LocateRequest


  • public class LocateRequest
    extends Request
    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
    • 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
      void execute​(org.datanucleus.state.DNStateManager 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
    • 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 retrieve
        cmd - Metadata for the class we are locating an instance of
        clr - ClassLoader resolver
    • Method Detail

      • 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.
        Specified by:
        execute in class Request
        Parameters:
        sm - StateManager for the record to be retrieved