Package org.hibernate.engine.jdbc.spi
Interface ResultSetReturn
-
public interface ResultSetReturnContract for extractingResultSets fromStatements, executing the statements, managing resources, and logging statement calls.Generally the methods here for dealing with
CallableStatementare extremely limited- See Also:
JdbcCoordinator.getResultSetReturn()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ResultSetexecute(PreparedStatement statement)Execute thePreparedStatementreturn its firstResultSet, if any.ResultSetexecute(PreparedStatement statement, String sql)Execute thePreparedStatementreturn its firstResultSet, if any.ResultSetexecute(Statement statement, String sql)Performs the given SQL statement, returning its firstResultSet, if any.intexecuteUpdate(PreparedStatement statement)Execute thePreparedStatement, returning its "affected row count".intexecuteUpdate(PreparedStatement statement, String sql)Execute thePreparedStatement, returning its "affected row count".intexecuteUpdate(Statement statement, String sql)Execute the given SQL statement returning its "affected row count".ResultSetextract(CallableStatement callableStatement)Extract theResultSetfrom theCallableStatement.ResultSetextract(PreparedStatement statement)Extract theResultSetfrom thePreparedStatement.ResultSetextract(PreparedStatement statement, String sql)Extract theResultSetfrom thePreparedStatement.ResultSetextract(Statement statement, String sql)Performs the given SQL statement, expecting aResultSetin return
-
-
-
Method Detail
-
extract
ResultSet extract(PreparedStatement statement)
Extract theResultSetfrom thePreparedStatement.If client passes
CallableStatementreference, this method callsextract(CallableStatement)internally. Otherwise,PreparedStatement.executeQuery()is called.- Parameters:
statement- ThePreparedStatementfrom which to extract theResultSet- Returns:
- The extracted ResultSet
-
extract
ResultSet extract(PreparedStatement statement, String sql)
Extract theResultSetfrom thePreparedStatement.If client passes
CallableStatementreference, this method callsextract(CallableStatement)internally. Otherwise,PreparedStatement.executeQuery()is called.- Parameters:
statement- ThePreparedStatementfrom which to extract theResultSet- Returns:
- The extracted
ResultSet
-
extract
ResultSet extract(CallableStatement callableStatement)
Extract theResultSetfrom theCallableStatement. Note that this is the limited legacy form which delegates toDialect.getResultSet(java.sql.CallableStatement). Better option is to integrateProcedureCall-like hooks- Parameters:
callableStatement- TheCallableStatementfrom which to extract theResultSet- Returns:
- The extracted
ResultSet
-
extract
ResultSet extract(Statement statement, String sql)
Performs the given SQL statement, expecting aResultSetin return
-
execute
ResultSet execute(PreparedStatement statement)
Execute thePreparedStatementreturn its firstResultSet, if any. If there is noResultSet, returnsnull- Parameters:
statement- ThePreparedStatementto execute- Returns:
- The extracted
ResultSet, ornull
-
execute
ResultSet execute(PreparedStatement statement, String sql)
Execute thePreparedStatementreturn its firstResultSet, if any. If there is noResultSet, returnsnull- Parameters:
statement- ThePreparedStatementto executesql- For error reporting- Returns:
- The extracted
ResultSet, ornull
-
executeUpdate
int executeUpdate(PreparedStatement statement)
Execute thePreparedStatement, returning its "affected row count".- Parameters:
statement- ThePreparedStatementto execute- Returns:
- The
PreparedStatement.executeUpdate()result
-
executeUpdate
int executeUpdate(PreparedStatement statement, String sql)
Execute thePreparedStatement, returning its "affected row count".- Parameters:
statement- ThePreparedStatementto executesql- For error reporting- Returns:
- The
PreparedStatement.executeUpdate()result
-
executeUpdate
int executeUpdate(Statement statement, String sql)
Execute the given SQL statement returning its "affected row count".- Parameters:
statement- The JDBCStatementobject to usesql- The SQL to execute- Returns:
- The
Statement.executeUpdate(String)result
-
-