public interface Batcher
PreparedStatement
,
SessionImpl
Modifier and Type | Method and Description |
---|---|
void |
abortBatch(SQLException sqle)
Must be called when an exception occurs
|
void |
addToBatch(Expectation expectation)
Add an insert / delete / update to the current batch (might be called multiple times
for single prepareBatchStatement())
|
void |
cancelLastQuery()
Cancel the current query statement
|
void |
closeConnection(Connection conn)
Deprecated.
Obtain connections from
ConnectionProvider instead |
void |
closeQueryStatement(PreparedStatement ps,
ResultSet rs)
Close a prepared statement opened with prepareQueryStatement()
|
void |
closeStatement(PreparedStatement ps)
Close a prepared or callable statement opened using prepareStatement() or prepareCallableStatement()
|
void |
closeStatements()
Close any query statements that were left lying around
|
void |
executeBatch()
Execute the batch
|
ResultSet |
getResultSet(CallableStatement ps,
Dialect dialect)
Execute the statement and return the result set from a callable statement
|
ResultSet |
getResultSet(PreparedStatement ps)
Execute the statement and return the result set
|
boolean |
hasOpenResources() |
Connection |
openConnection()
Deprecated.
Obtain connections from
ConnectionProvider instead |
String |
openResourceStatsAsString() |
CallableStatement |
prepareBatchCallableStatement(String sql)
Get a batchable callable statement to use for inserting / deleting / updating
(might be called many times before a single call to executeBatch()).
|
PreparedStatement |
prepareBatchStatement(String sql)
Get a batchable prepared statement to use for inserting / deleting / updating
(might be called many times before a single call to executeBatch()).
|
CallableStatement |
prepareCallableQueryStatement(String sql,
boolean scrollable,
ScrollMode scrollMode)
Get a prepared statement for use in loading / querying.
|
CallableStatement |
prepareCallableStatement(String sql)
Get a non-batchable callable statement to use for inserting / deleting / updating.
|
PreparedStatement |
prepareQueryStatement(String sql,
boolean scrollable,
ScrollMode scrollMode)
Get a prepared statement for use in loading / querying.
|
PreparedStatement |
prepareSelectStatement(String sql)
Get a non-batchable prepared statement to use for selecting.
|
PreparedStatement |
prepareStatement(String sql)
Get a non-batchable prepared statement to use for inserting / deleting / updating.
|
PreparedStatement |
prepareStatement(String sql,
boolean useGetGeneratedKeys)
Get a non-batchable prepared statement to use for inserting / deleting / updating,
using JDBC3 getGeneratedKeys (
Connection.prepareStatement(String, int) ). |
PreparedStatement |
prepareStatement(String sql,
String[] columnNames)
Get a non-batchable prepared statement to use for inserting / deleting / updating.
|
void |
setTransactionTimeout(int seconds)
Set the transaction timeout to seconds later
than the current system time.
|
void |
unsetTransactionTimeout()
Unset the transaction timeout, called after the end of a
transaction.
|
PreparedStatement prepareQueryStatement(String sql, boolean scrollable, ScrollMode scrollMode) throws SQLException, HibernateException
SQLException
HibernateException
void closeQueryStatement(PreparedStatement ps, ResultSet rs) throws SQLException
SQLException
CallableStatement prepareCallableQueryStatement(String sql, boolean scrollable, ScrollMode scrollMode) throws SQLException, HibernateException
SQLException
HibernateException
PreparedStatement prepareSelectStatement(String sql) throws SQLException, HibernateException
SQLException
HibernateException
PreparedStatement prepareStatement(String sql, boolean useGetGeneratedKeys) throws SQLException, HibernateException
Connection.prepareStatement(String, int)
).
Must be explicitly released by closeStatement(java.sql.PreparedStatement)
after use.SQLException
HibernateException
PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException, HibernateException
Connection.prepareStatement(String, String[])
).
Must be explicitly released by closeStatement(java.sql.PreparedStatement)
after use.SQLException
HibernateException
PreparedStatement prepareStatement(String sql) throws SQLException, HibernateException
closeStatement(java.sql.PreparedStatement)
after use.SQLException
HibernateException
CallableStatement prepareCallableStatement(String sql) throws SQLException, HibernateException
closeStatement(java.sql.PreparedStatement)
after use.SQLException
HibernateException
void closeStatement(PreparedStatement ps) throws SQLException
SQLException
PreparedStatement prepareBatchStatement(String sql) throws SQLException, HibernateException
SQLException
HibernateException
addToBatch(org.hibernate.jdbc.Expectation)
CallableStatement prepareBatchCallableStatement(String sql) throws SQLException, HibernateException
SQLException
HibernateException
addToBatch(org.hibernate.jdbc.Expectation)
void addToBatch(Expectation expectation) throws SQLException, HibernateException
SQLException
HibernateException
void executeBatch() throws HibernateException
HibernateException
void closeStatements()
ResultSet getResultSet(PreparedStatement ps) throws SQLException
SQLException
ResultSet getResultSet(CallableStatement ps, Dialect dialect) throws SQLException
SQLException
void abortBatch(SQLException sqle)
sqle
- the (not null) exception that is the reason for abortingvoid cancelLastQuery() throws HibernateException
HibernateException
boolean hasOpenResources()
String openResourceStatsAsString()
Connection openConnection() throws HibernateException
ConnectionProvider
insteadHibernateException
void closeConnection(Connection conn) throws HibernateException
ConnectionProvider
insteadHibernateException
void setTransactionTimeout(int seconds)
void unsetTransactionTimeout()
Copyright © 2002-2015 Red Hat Middleware, LLC. All Rights Reserved