org.apache.ojb.broker.util.batch
Class BatchConnection
java.lang.Object
org.apache.ojb.broker.util.WrappedConnection
org.apache.ojb.broker.util.batch.BatchConnection
- All Implemented Interfaces:
- Connection, Wrapper
public class BatchConnection
- extends WrappedConnection
The implementation of Connection which
automatically gathers INSERT, UPDATE and DELETE
PreparedStatements into batches.
- Version:
- $Id: BatchConnection.java,v 1.1 2007-08-24 22:17:42 ewestfal Exp $
- Author:
- Oleg Nitz (olegnitz@apache.org)
| Methods inherited from class org.apache.ojb.broker.util.WrappedConnection |
activateConnection, checkOpen, clearWarnings, close, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getDelegate, getHoldability, getInnermostDelegate, getMetaData, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, isValid, isWrapperFor, nativeSQL, passivateConnection, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setDelegate, setHoldability, setReadOnly, setSavepoint, setSavepoint, setTransactionIsolation, setTypeMap, toString, unwrap |
BatchConnection
public BatchConnection(Connection conn,
PersistenceBroker broker)
setUseBatchInserts
public void setUseBatchInserts(boolean useBatchInserts)
prepareStatement
public PreparedStatement prepareStatement(String sql)
throws SQLException
- Specified by:
prepareStatement in interface Connection- Overrides:
prepareStatement in class WrappedConnection
- Throws:
SQLException
prepareStatement
public PreparedStatement prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency)
throws SQLException
- Specified by:
prepareStatement in interface Connection- Overrides:
prepareStatement in class WrappedConnection
- Throws:
SQLException
executeBatch
public void executeBatch()
throws SQLException
- Throws:
SQLException
executeBatchIfNecessary
public void executeBatchIfNecessary()
throws SQLException
- Throws:
SQLException
clearBatch
public void clearBatch()
commit
public void commit()
throws SQLException
- Specified by:
commit in interface Connection- Overrides:
commit in class WrappedConnection
- Throws:
SQLException
rollback
public void rollback()
throws SQLException
- Specified by:
rollback in interface Connection- Overrides:
rollback in class WrappedConnection
- Throws:
SQLException
Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.