s for a session. Abstracts JDBC
batching to maintain the illusion that a single logical batch
exists for the whole session, even when batching is disabled.
Provides transparent
caching.
| Method from org.hibernate.jdbc.Batcher Detail: |
public void abortBatch(SQLException sqle)
Must be called when an exception occurs |
public void addToBatch(Expectation expectation) throws HibernateException, SQLException
Add an insert / delete / update to the current batch (might be called multiple times
for single prepareBatchStatement()) |
public void cancelLastQuery() throws HibernateException
Cancel the current query statement |
public void closeConnection(Connection conn) throws HibernateException
Dispose of the JDBC connection |
public void closeQueryStatement(PreparedStatement ps,
ResultSet rs) throws SQLException
Close a prepared statement opened with prepareQueryStatement() |
public void closeStatement(PreparedStatement ps) throws SQLException
Close a prepared or callable statement opened using prepareStatement() or prepareCallableStatement() |
public void closeStatements()
Close any query statements that were left lying around |
public void executeBatch() throws HibernateException
|
public ResultSet getResultSet(PreparedStatement ps) throws SQLException
Execute the statement and return the result set |
public ResultSet getResultSet(CallableStatement ps,
Dialect dialect) throws SQLException
Execute the statement and return the result set from a callable statement |
public boolean hasOpenResources()
|
public Connection openConnection() throws HibernateException
|
public String openResourceStatsAsString()
|
public CallableStatement prepareBatchCallableStatement(String sql) throws HibernateException, SQLException
Get a batchable callable statement to use for inserting / deleting / updating
(might be called many times before a single call to executeBatch()).
After setting parameters, call addToBatch - do not execute the
statement explicitly. |
public PreparedStatement prepareBatchStatement(String sql) throws HibernateException, SQLException
Get a batchable prepared statement to use for inserting / deleting / updating
(might be called many times before a single call to executeBatch()).
After setting parameters, call addToBatch - do not execute the
statement explicitly. |
public CallableStatement prepareCallableQueryStatement(String sql,
boolean scrollable,
ScrollMode scrollMode) throws HibernateException, SQLException
Get a prepared statement for use in loading / querying. If not explicitly
released by closeQueryStatement(), it will be released when the
session is closed or disconnected. |
public CallableStatement prepareCallableStatement(String sql) throws HibernateException, SQLException
Get a non-batchable callable statement to use for inserting / deleting / updating.
Must be explicitly released by #closeStatement after use. |
public PreparedStatement prepareQueryStatement(String sql,
boolean scrollable,
ScrollMode scrollMode) throws HibernateException, SQLException
Get a prepared statement for use in loading / querying. If not explicitly
released by closeQueryStatement(), it will be released when the
session is closed or disconnected. |
public PreparedStatement prepareSelectStatement(String sql) throws HibernateException, SQLException
Get a non-batchable prepared statement to use for selecting. Does not
result in execution of the current batch. |
public PreparedStatement prepareStatement(String sql) throws HibernateException, SQLException
Get a non-batchable prepared statement to use for inserting / deleting / updating.
Must be explicitly released by #closeStatement after use. |
public PreparedStatement prepareStatement(String sql,
boolean useGetGeneratedKeys) throws HibernateException, SQLException
|
public PreparedStatement prepareStatement(String sql,
String[] columnNames) throws HibernateException, SQLException
|
public void setTransactionTimeout(int seconds)
Set the transaction timeout to seconds later
than the current system time. |
public void unsetTransactionTimeout()
Unset the transaction timeout, called after the end of a
transaction. |