Class PostgresBatchAction
java.lang.Object
org.apache.cayenne.access.jdbc.BaseSQLAction
org.apache.cayenne.access.jdbc.BatchAction
org.apache.cayenne.dba.postgres.PostgresBatchAction
- All Implemented Interfaces:
SQLAction
-
Field Summary
Fields inherited from class BatchAction
keyRowDescriptor, query, runningAsBatchFields inherited from class BaseSQLAction
dataNode -
Constructor Summary
ConstructorsConstructorDescriptionPostgresBatchAction(BatchQuery query, DataNode dataNode, boolean runningAsBatch) -
Method Summary
Modifier and TypeMethodDescriptionprotected PreparedStatementprepareStatement(Connection connection, String queryStr, DbAdapter adapter, boolean generatedKeys) Methods inherited from class BatchAction
canRunAsBatch, createTranslator, getQuery, hasGeneratedKeys, performAction, processGeneratedKeys, processGeneratedKeys, runAsBatch, runAsIndividualQueries, supportsGeneratedKeysModifier and TypeMethodDescriptionprotected booleanprotected BatchTranslatorgetQuery()protected booleanReturns whether BatchQuery generates any keys.voidperformAction(Connection connection, OperationObserver observer) Executes a query using a strategy defined by the implementation.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
-
PostgresBatchAction
- Since:
- 4.0
-
-
Method Details
-
prepareStatement
protected PreparedStatement prepareStatement(Connection connection, String queryStr, DbAdapter adapter, boolean generatedKeys) throws SQLException - Overrides:
prepareStatementin classBatchAction- Throws:
SQLException
-