Class SelectAction

java.lang.Object
org.apache.cayenne.access.jdbc.BaseSQLAction
org.apache.cayenne.access.jdbc.SelectAction
All Implemented Interfaces:
SQLAction
Direct Known Subclasses:
DB2SelectAction, DerbySelectAction, FirebirdSelectAction, H2SelectAction, IngresSelectAction, SQLiteSelectAction, SQLServerSelectAction

public class SelectAction extends BaseSQLAction
A SQLAction that handles SelectQuery execution.
Since:
1.2
  • Field Details

  • Constructor Details

    • SelectAction

      public SelectAction(Select<?> query, DataNode dataNode)
      Since:
      4.0
  • Method Details

    • performAction

      public void performAction(Connection connection, OperationObserver observer) throws Exception
      Description copied from interface: SQLAction
      Executes a query using a strategy defined by the implementation.
      Throws:
      Exception
    • performAction

      protected void performAction(Connection connection, OperationObserver observer, TranslatedSelect translated) throws Exception
      Throws:
      Exception
    • resultColumns

      protected RSColumn[] resultColumns(TranslatedSelect translated, ResultSet rs) throws SQLException
      Throws:
      SQLException
    • statementFetchSize

      protected int statementFetchSize(OperationHints hints)
      Returns the fetch size to set on the PreparedStatement, or 0 to leave the driver default alone. The base implementation returns the fetch size of the query, whatever it is. Adapter-specific subclasses may substitute a default of their own when the query does not set one, but must always honor a non-zero query value.
      Parameters:
      hints - whether the result is handed to the caller as a ResultIterator that outlives this action, and if so, whether that iterator has the connection to itself until it is closed.
      Since:
      5.0