- java.lang.Object
-
- org.jooq.tools.jdbc.JDBC41Statement
-
- org.jooq.tools.jdbc.DefaultStatement
-
- org.jooq.tools.jdbc.DefaultPreparedStatement
-
- org.jooq.tools.jdbc.BatchedPreparedStatement
-
- All Implemented Interfaces:
AutoCloseable,PreparedStatement,Statement,Wrapper
public class BatchedPreparedStatement extends DefaultPreparedStatement
A batched statement.This statement doesn't execute immediately, but buffers all bind variables in batch, delaying execution until a new SQL string is encountered. See
BatchedConnectionfor details.- Author:
- Lukas Eder
- See Also:
BatchedConnection
-
-
Field Summary
-
Fields inherited from interface java.sql.Statement
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
-
-
Constructor Summary
Constructors Constructor Description BatchedPreparedStatement(BatchedConnection connection, PreparedStatement delegate)
-
Method Summary
-
Methods inherited from class org.jooq.tools.jdbc.DefaultPreparedStatement
clearParameters, getDelegate, getDelegatePreparedStatement, getMetaData, getParameterMetaData, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setNull, setNull, setObject, setObject, setObject, setObject, setObject, setRef, setRowId, setShort, setSQLXML, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL
-
Methods inherited from class org.jooq.tools.jdbc.DefaultStatement
cancel, clearWarnings, closeOnCompletion, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, getConnection, getDelegateStatement, getFetchDirection, getFetchSize, getLargeMaxRows, getMaxFieldSize, getMaxRows, getQueryTimeout, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isSimpleIdentifier, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, wrap
-
Methods inherited from class org.jooq.tools.jdbc.JDBC41Statement
getObject, getObject
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.sql.Statement
cancel, clearWarnings, closeOnCompletion, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, getConnection, getFetchDirection, getFetchSize, getLargeMaxRows, getMaxFieldSize, getMaxRows, getQueryTimeout, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isSimpleIdentifier, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout
-
-
-
-
Constructor Detail
-
BatchedPreparedStatement
public BatchedPreparedStatement(BatchedConnection connection, PreparedStatement delegate)
-
-
Method Detail
-
getBatchedConnection
public BatchedConnection getBatchedConnection() throws SQLException
- Throws:
SQLException
-
getExecuteImmediate
public boolean getExecuteImmediate()
-
setExecuteImmediate
public void setExecuteImmediate(boolean executeImmediate)
-
unwrap
public <T> T unwrap(Class<T> iface) throws SQLException
- Specified by:
unwrapin interfaceWrapper- Overrides:
unwrapin classDefaultStatement- Throws:
SQLException
-
isWrapperFor
public boolean isWrapperFor(Class<?> iface) throws SQLException
- Specified by:
isWrapperForin interfaceWrapper- Overrides:
isWrapperForin classDefaultStatement- Throws:
SQLException
-
executeUpdate
public int executeUpdate() throws SQLException- Specified by:
executeUpdatein interfacePreparedStatement- Overrides:
executeUpdatein classDefaultPreparedStatement- Throws:
SQLException
-
execute
public boolean execute() throws SQLException- Specified by:
executein interfacePreparedStatement- Overrides:
executein classDefaultPreparedStatement- Throws:
SQLException
-
getUpdateCount
public int getUpdateCount() throws SQLException- Specified by:
getUpdateCountin interfaceStatement- Overrides:
getUpdateCountin classDefaultStatement- Throws:
SQLException
-
executeLargeUpdate
public long executeLargeUpdate() throws SQLException- Specified by:
executeLargeUpdatein interfacePreparedStatement- Overrides:
executeLargeUpdatein classDefaultPreparedStatement- Throws:
SQLException
-
getLargeUpdateCount
public long getLargeUpdateCount() throws SQLException- Specified by:
getLargeUpdateCountin interfaceStatement- Overrides:
getLargeUpdateCountin classDefaultStatement- Throws:
SQLException
-
close
public void close() throws SQLException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceStatement- Overrides:
closein classDefaultStatement- Throws:
SQLException
-
getMoreResults
public boolean getMoreResults() throws SQLException- Specified by:
getMoreResultsin interfaceStatement- Overrides:
getMoreResultsin classDefaultStatement- Throws:
SQLException
-
getMoreResults
public boolean getMoreResults(int current) throws SQLException- Specified by:
getMoreResultsin interfaceStatement- Overrides:
getMoreResultsin classDefaultStatement- Throws:
SQLException
-
addBatch
public void addBatch() throws SQLException- Specified by:
addBatchin interfacePreparedStatement- Overrides:
addBatchin classDefaultPreparedStatement- Throws:
SQLException
-
clearBatch
public void clearBatch() throws SQLException- Specified by:
clearBatchin interfaceStatement- Overrides:
clearBatchin classDefaultStatement- Throws:
SQLException
-
executeBatch
public int[] executeBatch() throws SQLException- Specified by:
executeBatchin interfaceStatement- Overrides:
executeBatchin classDefaultStatement- Throws:
SQLException
-
executeLargeBatch
public long[] executeLargeBatch() throws SQLException- Specified by:
executeLargeBatchin interfaceStatement- Overrides:
executeLargeBatchin classDefaultStatement- Throws:
SQLException
-
addBatch
public void addBatch(String sql) throws SQLException
- Specified by:
addBatchin interfaceStatement- Overrides:
addBatchin classDefaultStatement- Throws:
SQLException
-
execute
public boolean execute(String sql) throws SQLException
- Specified by:
executein interfaceStatement- Overrides:
executein classDefaultStatement- Throws:
SQLException
-
execute
public boolean execute(String sql, int autoGeneratedKeys) throws SQLException
- Specified by:
executein interfaceStatement- Overrides:
executein classDefaultStatement- Throws:
SQLException
-
execute
public boolean execute(String sql, int[] columnIndexes) throws SQLException
- Specified by:
executein interfaceStatement- Overrides:
executein classDefaultStatement- Throws:
SQLException
-
execute
public boolean execute(String sql, String[] columnNames) throws SQLException
- Specified by:
executein interfaceStatement- Overrides:
executein classDefaultStatement- Throws:
SQLException
-
executeUpdate
public int executeUpdate(String sql) throws SQLException
- Specified by:
executeUpdatein interfaceStatement- Overrides:
executeUpdatein classDefaultStatement- Throws:
SQLException
-
executeUpdate
public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException
- Specified by:
executeUpdatein interfaceStatement- Overrides:
executeUpdatein classDefaultStatement- Throws:
SQLException
-
executeUpdate
public int executeUpdate(String sql, int[] columnIndexes) throws SQLException
- Specified by:
executeUpdatein interfaceStatement- Overrides:
executeUpdatein classDefaultStatement- Throws:
SQLException
-
executeUpdate
public int executeUpdate(String sql, String[] columnNames) throws SQLException
- Specified by:
executeUpdatein interfaceStatement- Overrides:
executeUpdatein classDefaultStatement- Throws:
SQLException
-
executeLargeUpdate
public long executeLargeUpdate(String sql) throws SQLException
- Specified by:
executeLargeUpdatein interfaceStatement- Overrides:
executeLargeUpdatein classDefaultStatement- Throws:
SQLException
-
executeLargeUpdate
public long executeLargeUpdate(String sql, int autoGeneratedKeys) throws SQLException
- Specified by:
executeLargeUpdatein interfaceStatement- Overrides:
executeLargeUpdatein classDefaultStatement- Throws:
SQLException
-
executeLargeUpdate
public long executeLargeUpdate(String sql, int[] columnIndexes) throws SQLException
- Specified by:
executeLargeUpdatein interfaceStatement- Overrides:
executeLargeUpdatein classDefaultStatement- Throws:
SQLException
-
executeLargeUpdate
public long executeLargeUpdate(String sql, String[] columnNames) throws SQLException
- Specified by:
executeLargeUpdatein interfaceStatement- Overrides:
executeLargeUpdatein classDefaultStatement- Throws:
SQLException
-
executeQuery
public ResultSet executeQuery(String sql) throws SQLException
- Specified by:
executeQueryin interfaceStatement- Overrides:
executeQueryin classDefaultStatement- Throws:
SQLException
-
executeQuery
public ResultSet executeQuery() throws SQLException
- Specified by:
executeQueryin interfacePreparedStatement- Overrides:
executeQueryin classDefaultPreparedStatement- Throws:
SQLException
-
getResultSet
public ResultSet getResultSet() throws SQLException
- Specified by:
getResultSetin interfaceStatement- Overrides:
getResultSetin classDefaultStatement- Throws:
SQLException
-
getGeneratedKeys
public ResultSet getGeneratedKeys() throws SQLException
- Specified by:
getGeneratedKeysin interfaceStatement- Overrides:
getGeneratedKeysin classDefaultStatement- Throws:
SQLException
-
-