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
- Since:
- 1.2
-
Field Summary
Fields inherited from class BatchAction
keyRowDescriptor, query, runningAsBatchFields inherited from class BaseSQLAction
dataNode -
Constructor Summary
ConstructorsConstructorDescriptionSQLServerBatchAction(BatchQuery batchQuery, DataNode dataNode, boolean runningAsBatch) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanReturns whether a table has identity columns.voidperformAction(Connection connection, OperationObserver observer) Executes a query using a strategy defined by the implementation.protected voidsetIdentityInsert(Connection connection, boolean on) Methods inherited from class BatchAction
canRunAsBatch, createTranslator, getQuery, hasGeneratedKeys, prepareStatement, processGeneratedKeys, processGeneratedKeys, runAsBatch, runAsIndividualQueries, supportsGeneratedKeysModifier and TypeMethodDescriptionprotected booleanprotected BatchTranslatorgetQuery()protected booleanReturns whether BatchQuery generates any keys.protected PreparedStatementprepareStatement(Connection connection, String queryStr, DbAdapter adapter, boolean generatedKeys) protected voidprocessGeneratedKeys(Statement statement, OperationObserver observer, List<BatchQueryRow> rows) protected voidprocessGeneratedKeys(Statement statement, OperationObserver observer, BatchQueryRow row) Implements generated keys extraction supported in JDBC 3.0 specification.protected voidrunAsBatch(Connection con, BatchTranslator translator, OperationObserver delegate, boolean generatesKeys) protected voidrunAsIndividualQueries(Connection connection, BatchTranslator translator, OperationObserver delegate, boolean generatesKeys) Executes batch as individual queries over the same prepared statement.protected booleansupportsGeneratedKeys(boolean isBatch) Methods inherited from class BaseSQLAction
getInMemoryOffset, readResultSetModifier and TypeMethodDescriptionprotected intgetInMemoryOffset(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 voidreadResultSet(ResultSet resultSet, RowDescriptor descriptor, Query query, OperationObserver delegate) Helper method to process a ResultSet.
-
Constructor Details
-
SQLServerBatchAction
-
-
Method Details
-
performAction
public void performAction(Connection connection, OperationObserver observer) throws SQLException, Exception Description copied from interface:SQLActionExecutes a query using a strategy defined by the implementation.- Specified by:
performActionin interfaceSQLAction- Overrides:
performActionin classBatchAction- Throws:
SQLExceptionException
-
setIdentityInsert
- Throws:
SQLException
-
expectsToOverrideIdentityColumns
protected boolean expectsToOverrideIdentityColumns()Returns whether a table has identity columns.
-