BaseSQLAction (cayenne-doc: Cayenne Documentation 5.0-M2 API)
Description: declaration: package: org.apache.cayenne.access.jdbc, class: BaseSQLAction

# Class BaseSQLAction

java.lang.Object
org.apache.cayenne.access.jdbc.BaseSQLAction

All Implemented Interfaces:
  `SQLAction`

Direct Known Subclasses:
  `BatchAction, EJBQLAction, ProcedureAction, SelectAction`

public abstract class BaseSQLAction extends Object implements SQLAction
A convenience superclass for SQLAction implementations.

Since:
  1.2

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected DataNode`
  `dataNode`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BaseSQLAction(DataNode dataNode)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected int`
  `getInMemoryOffset(int queryOffset)`
  Returns a value of the offset that will be used to rewind the ResultSet within the SQL action before reading the result rows.
  `protected void`
  `readResultSet(ResultSet resultSet, RowDescriptor descriptor, Query query, OperationObserver delegate)`
  Helper method to process a ResultSet.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface SQLAction

  `performAction`
  Modifier and Type
  Method
  Description
  `void`
  `performAction(Connection connection, OperationObserver observer)`
  Executes a query using a strategy defined by the implementation.

- ## Field Details

  - ### dataNode

    protected DataNode dataNode

- ## Constructor Details

  - ### BaseSQLAction

    public BaseSQLAction(DataNode dataNode)
    Since:
      4.0

- ## Method Details

  - ### readResultSet

    protected void readResultSet(ResultSet resultSet, RowDescriptor descriptor, Query query, OperationObserver delegate) throws SQLException, Exception
    Helper method to process a ResultSet.
    Throws:
      `SQLException`
      `Exception`

  - ### getInMemoryOffset

    protected int getInMemoryOffset(int queryOffset)
    Returns a value of the offset that will be used to rewind the ResultSet within the SQL action before reading the result rows. The default implementation returns 'queryOffset' argument. If the adapter supports setting offset at the SQL level, this method must be overridden to return zero to suppress manual offset.
    Since:
      3.0