Top Description Fields Constructors Methods
org.jooq.tools.jdbc

public Class BatchedPreparedStatement

extends DefaultPreparedStatement
Class Inheritance
Imports
java.sql.PreparedStatement, .ResultSet, .SQLException, org.jooq.tools.JooqLogger

Deprecated

as a consequence of DefaultPreparedStatement being deprecated. See corresponding docs for further information.

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 BatchedConnection for details.

Author
Lukas Eder
See Also
BatchedConnection

Field Summary

Modifier and TypeField and Description
pack-priv int
pack-priv boolean
pack-priv boolean
private static final JooqLogger
pack-priv final String

Constructor Summary

AccessConstructor and Description
public
BatchedPreparedStatement(String sql, BatchedConnection connection, PreparedStatement delegate)

Deprecated as a consequence of BatchedConnection being deprecated.

Method Summary

Modifier and TypeMethod and Description
public void
addBatch()

Overrides org.jooq.tools.jdbc.DefaultPreparedStatement.addBatch.

Implements java.sql.PreparedStatement.addBatch.

Adds a set of parameters to this PreparedStatement object's batch of commands.
public void
addBatch(String
typically this is a SQL INSERT or UPDATE statement
s
)

Overrides org.jooq.tools.jdbc.DefaultStatement.addBatch.

Implements java.sql.Statement.addBatch.

Adds the given SQL command to the current list of commands for this Statement object.
public void
clearBatch()

Overrides org.jooq.tools.jdbc.DefaultStatement.clearBatch.

Implements java.sql.Statement.clearBatch.

Empties this Statement object's current list of SQL commands.
public void
close()

Overrides org.jooq.tools.jdbc.DefaultStatement.close.

Implements java.sql.Statement.close.

Releases this Statement object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.
public boolean
execute()

Overrides org.jooq.tools.jdbc.DefaultPreparedStatement.execute.

Implements java.sql.PreparedStatement.execute.

Executes the SQL statement in this PreparedStatement object, which may be any kind of SQL statement.
public boolean
execute(String
any SQL statement
s
)

Overrides org.jooq.tools.jdbc.DefaultStatement.execute.

Implements java.sql.Statement.execute.

Executes the given SQL statement, which may return multiple results.
public boolean
execute(String
any SQL statement
s
,
int
a constant indicating whether auto-generated keys should be made available for retrieval using the method getGeneratedKeys; one of the following constants: Statement.RETURN_GENERATED_KEYS or Statement.NO_GENERATED_KEYS
autoGeneratedKeys
)

Overrides org.jooq.tools.jdbc.DefaultStatement.execute.

Implements java.sql.Statement.execute.

Executes the given SQL statement, which may return multiple results, and signals the driver that any auto-generated keys should be made available for retrieval.
public boolean
execute(String
any SQL statement
s
,
int[]
an array of the indexes of the columns in the inserted row that should be made available for retrieval by a call to the method getGeneratedKeys
columnIndexes
)

Overrides org.jooq.tools.jdbc.DefaultStatement.execute.

Implements java.sql.Statement.execute.

Executes the given SQL statement, which may return multiple results, and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
public boolean
execute(String
any SQL statement
sql
,
String[]
an array of the names of the columns in the inserted row that should be made available for retrieval by a call to the method getGeneratedKeys
columnNames
)

Overrides org.jooq.tools.jdbc.DefaultStatement.execute.

Implements java.sql.Statement.execute.

Executes the given SQL statement, which may return multiple results, and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
public int[]
executeBatch()

Overrides org.jooq.tools.jdbc.DefaultStatement.executeBatch.

Implements java.sql.Statement.executeBatch.

Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts.
public long[]
executeLargeBatch()

Overrides org.jooq.tools.jdbc.DefaultStatement.executeLargeBatch.

Overrides default java.sql.Statement.executeLargeBatch.

Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts.
public long
executeLargeUpdate()

Overrides org.jooq.tools.jdbc.DefaultPreparedStatement.executeLargeUpdate.

Overrides default java.sql.PreparedStatement.executeLargeUpdate.

Executes the SQL statement in this PreparedStatement object, which must be an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.
public long
executeLargeUpdate(String
an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.
s
)

Overrides org.jooq.tools.jdbc.DefaultStatement.executeLargeUpdate.

Overrides default java.sql.Statement.executeLargeUpdate.

Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement.
public long
executeLargeUpdate(String
an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.
s
,
int
a flag indicating whether auto-generated keys should be made available for retrieval; one of the following constants: Statement.RETURN_GENERATED_KEYS Statement.NO_GENERATED_KEYS
autoGeneratedKeys
)

Overrides org.jooq.tools.jdbc.DefaultStatement.executeLargeUpdate.

Overrides default java.sql.Statement.executeLargeUpdate.

Executes the given SQL statement and signals the driver with the given flag about whether the auto-generated keys produced by this Statement object should be made available for retrieval.
public long
executeLargeUpdate(String
an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.
s
,
int[]
an array of column indexes indicating the columns that should be returned from the inserted row
columnIndexes
)

Overrides org.jooq.tools.jdbc.DefaultStatement.executeLargeUpdate.

Overrides default java.sql.Statement.executeLargeUpdate.

Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
public long
executeLargeUpdate(String
an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.
s
,
String[]
an array of the names of the columns that should be returned from the inserted row
columnNames
)

Overrides org.jooq.tools.jdbc.DefaultStatement.executeLargeUpdate.

Overrides default java.sql.Statement.executeLargeUpdate.

Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
public ResultSet
executeQuery(String
an SQL statement to be sent to the database, typically a static SQL SELECT statement
s
)

Overrides org.jooq.tools.jdbc.DefaultStatement.executeQuery.

Implements java.sql.Statement.executeQuery.

Executes the given SQL statement, which returns a single ResultSet object.
public ResultSet
executeQuery()

Overrides org.jooq.tools.jdbc.DefaultPreparedStatement.executeQuery.

Implements java.sql.PreparedStatement.executeQuery.

Executes the SQL query in this PreparedStatement object and returns the ResultSet object generated by the query.
public int
executeUpdate()

Overrides org.jooq.tools.jdbc.DefaultPreparedStatement.executeUpdate.

Implements java.sql.PreparedStatement.executeUpdate.

Executes the SQL statement in this PreparedStatement object, which must be an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.
public int
executeUpdate(String
an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.
s
)

Overrides org.jooq.tools.jdbc.DefaultStatement.executeUpdate.

Implements java.sql.Statement.executeUpdate.

Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement.
public int
executeUpdate(String
an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.
s
,
int
a flag indicating whether auto-generated keys should be made available for retrieval; one of the following constants: Statement.RETURN_GENERATED_KEYS Statement.NO_GENERATED_KEYS
autoGeneratedKeys
)

Overrides org.jooq.tools.jdbc.DefaultStatement.executeUpdate.

Implements java.sql.Statement.executeUpdate.

Executes the given SQL statement and signals the driver with the given flag about whether the auto-generated keys produced by this Statement object should be made available for retrieval.
public int
executeUpdate(String
an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.
s
,
int[]
an array of column indexes indicating the columns that should be returned from the inserted row
columnIndexes
)

Overrides org.jooq.tools.jdbc.DefaultStatement.executeUpdate.

Implements java.sql.Statement.executeUpdate.

Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
public int
executeUpdate(String
an SQL Data Manipulation Language (DML) statement, such as INSERT, UPDATE or DELETE; or an SQL statement that returns nothing, such as a DDL statement.
s
,
String[]
an array of the names of the columns that should be returned from the inserted row
columnNames
)

Overrides org.jooq.tools.jdbc.DefaultStatement.executeUpdate.

Implements java.sql.Statement.executeUpdate.

Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
public BatchedConnection
getBatchedConnection()

Deprecated as a consequence of BatchedConnection being deprecated.
public boolean
public ResultSet
getGeneratedKeys()

Overrides org.jooq.tools.jdbc.DefaultStatement.getGeneratedKeys.

Implements java.sql.Statement.getGeneratedKeys.

Retrieves any auto-generated keys created as a result of executing this Statement object.
public long
getLargeUpdateCount()

Overrides org.jooq.tools.jdbc.DefaultStatement.getLargeUpdateCount.

Overrides default java.sql.Statement.getLargeUpdateCount.

Retrieves the current result as an update count; if the result is a ResultSet object or there are no more results, -1 is returned.
public boolean
getMoreResults()

Overrides org.jooq.tools.jdbc.DefaultStatement.getMoreResults.

Implements java.sql.Statement.getMoreResults.

Moves to this Statement object's next result, returns true if it is a ResultSet object, and implicitly closes any current ResultSet object(s) obtained with the method getResultSet.
public boolean
getMoreResults(int
one of the following Statement constants indicating what should happen to current ResultSet objects obtained using the method getResultSet: Statement.CLOSE_CURRENT_RESULT, Statement.KEEP_CURRENT_RESULT, or Statement.CLOSE_ALL_RESULTS
current
)

Overrides org.jooq.tools.jdbc.DefaultStatement.getMoreResults.

Implements java.sql.Statement.getMoreResults.

Moves to this Statement object's next result, deals with any current ResultSet object(s) according to the instructions specified by the given flag, and returns true if the next result is a ResultSet object.
public ResultSet
getResultSet()

Overrides org.jooq.tools.jdbc.DefaultStatement.getResultSet.

Implements java.sql.Statement.getResultSet.

Retrieves the current result as a ResultSet object.
public int
getUpdateCount()

Overrides org.jooq.tools.jdbc.DefaultStatement.getUpdateCount.

Implements java.sql.Statement.getUpdateCount.

Retrieves the current result as an update count; if the result is a ResultSet object or there are no more results, -1 is returned.
public boolean
isWrapperFor(Class<?>
a Class defining an interface.
iface
)

Overrides org.jooq.tools.jdbc.DefaultStatement.isWrapperFor.

Implements java.sql.Wrapper.isWrapperFor.

Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does.
private void
private void
private void
private void
private void
public void
setExecuteImmediate(boolean executeImmediate)

public <T> T
unwrap(Class<T>
A Class defining an interface that the result must implement.
iface
)

Overrides org.jooq.tools.jdbc.DefaultStatement.unwrap.

Implements java.sql.Wrapper.unwrap.

Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy.
Inherited from org.jooq.tools.jdbc.DefaultPreparedStatement:
clearParametersgetDelegategetDelegatePreparedStatementgetMetaDatagetParameterMetaDatasetArraysetAsciiStreamsetAsciiStreamsetAsciiStreamsetBigDecimalsetBinaryStreamsetBinaryStreamsetBinaryStreamsetBlobsetBlobsetBlobsetBooleansetBytesetBytessetCharacterStreamsetCharacterStreamsetCharacterStreamsetClobsetClobsetClobsetDatesetDatesetDoublesetFloatsetIntsetLongsetNCharacterStreamsetNCharacterStreamsetNClobsetNClobsetNClobsetNStringsetNullsetNullsetObjectsetObjectsetObjectsetObjectsetObjectsetRefsetRowIdsetShortsetSQLXMLsetStringsetTimesetTimesetTimestampsetTimestampsetUnicodeStreamsetURL