SQLServerBatchAction (cayenne-doc: Cayenne Documentation 5.0-M2 API)
Description: declaration: package: org.apache.cayenne.dba.sqlserver, class: SQLServerBatchAction

# Class SQLServerBatchAction

java.lang.Object
org.apache.cayenne.access.jdbc.BaseSQLAction
org.apache.cayenne.access.jdbc.BatchAction
org.apache.cayenne.dba.sqlserver.SQLServerBatchAction

All Implemented Interfaces:
  `SQLAction`

public class SQLServerBatchAction extends BatchAction

Since:
  1.2

- ## Field Summary

  ### Fields inherited from class BatchAction

  `keyRowDescriptor, query, runningAsBatch`
  Modifier and Type
  Field
  Description
  `protected RowDescriptor`
  `keyRowDescriptor`
  `protected BatchQuery`
  `query`
  `protected boolean`
  `runningAsBatch`

  ### Fields inherited from class BaseSQLAction

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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SQLServerBatchAction(BatchQuery batchQuery, DataNode dataNode, boolean runningAsBatch)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected boolean`
  `expectsToOverrideIdentityColumns()`
  Returns whether a table has identity columns.
  `void`
  `performAction(Connection connection, OperationObserver observer)`
  Executes a query using a strategy defined by the implementation.
  `protected void`
  `setIdentityInsert(Connection connection, boolean on)`

  ### Methods inherited from class BatchAction

  `canRunAsBatch, createTranslator, getQuery, hasGeneratedKeys, prepareStatement, processGeneratedKeys, processGeneratedKeys, runAsBatch, runAsIndividualQueries, supportsGeneratedKeys`
  Modifier and Type
  Method
  Description
  `protected boolean`
  `canRunAsBatch()`
  `protected BatchTranslator`
  `createTranslator()`
  `BatchQuery`
  `getQuery()`
  `protected boolean`
  `hasGeneratedKeys()`
  Returns whether BatchQuery generates any keys.
  `protected PreparedStatement`
  `prepareStatement(Connection connection, String queryStr, DbAdapter adapter, boolean generatedKeys)`
  `protected void`
  `processGeneratedKeys(Statement statement, OperationObserver observer, List<BatchQueryRow> rows)`
  `protected void`
  `processGeneratedKeys(Statement statement, OperationObserver observer, BatchQueryRow row)`
  Implements generated keys extraction supported in JDBC 3.0 specification.
  `protected void`
  `runAsBatch(Connection con, BatchTranslator translator, OperationObserver delegate, boolean generatesKeys)`
  `protected void`
  `runAsIndividualQueries(Connection connection, BatchTranslator translator, OperationObserver delegate, boolean generatesKeys)`
  Executes batch as individual queries over the same prepared statement.
  `protected boolean`
  `supportsGeneratedKeys(boolean isBatch)`

  ### Methods inherited from class BaseSQLAction

  `getInMemoryOffset, readResultSet`
  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`

- ## Constructor Details

  - ### SQLServerBatchAction

    public SQLServerBatchAction(BatchQuery batchQuery, DataNode dataNode, boolean runningAsBatch)

- ## Method Details

  - ### performAction

    public void performAction(Connection connection, OperationObserver observer) throws SQLException, Exception
    Description copied from interface: `SQLAction`
    Executes a query using a strategy defined by the implementation.
    Specified by:
      `performAction` in interface `SQLAction`
    Overrides:
      `performAction` in class `BatchAction`
    Throws:
      `SQLException`
      `Exception`

  - ### setIdentityInsert

    protected void setIdentityInsert(Connection connection, boolean on) throws SQLException
    Throws:
      `SQLException`

  - ### expectsToOverrideIdentityColumns

    protected boolean expectsToOverrideIdentityColumns()
    Returns whether a table has identity columns.