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 Deprecated Methods Modifier and Type Method Description ResultSetexecute(PreparedStatement statement)Deprecated, for removal: This API element is subject to removal in a future version.Useexecute(PreparedStatement, String)insteadResultSetexecute(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)Deprecated, for removal: This API element is subject to removal in a future version.UseexecuteUpdate(PreparedStatement, String)insteadintexecuteUpdate(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)Deprecated, for removal: This API element is subject to removal in a future version.Useextract(PreparedStatement, String)insteadResultSetextract(PreparedStatement statement)Deprecated, for removal: This API element is subject to removal in a future version.Useextract(PreparedStatement, String)insteadResultSetextract(PreparedStatement statement, String sql)Extract theResultSetfrom thePreparedStatement.ResultSetextract(Statement statement, String sql)Performs the given SQL statement, expecting aResultSetin return
-
-
-
Method Detail
-
extract
@Deprecated(forRemoval=true) ResultSet extract(PreparedStatement statement)
Deprecated, for removal: This API element is subject to removal in a future version.Useextract(PreparedStatement, String)insteadExtract 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
@Deprecated(forRemoval=true) ResultSet extract(CallableStatement callableStatement)
Deprecated, for removal: This API element is subject to removal in a future version.Useextract(PreparedStatement, String)insteadExtract 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
@Deprecated(forRemoval=true) ResultSet execute(PreparedStatement statement)
Deprecated, for removal: This API element is subject to removal in a future version.Useexecute(PreparedStatement, String)insteadExecute 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
@Deprecated(forRemoval=true) int executeUpdate(PreparedStatement statement)
Deprecated, for removal: This API element is subject to removal in a future version.UseexecuteUpdate(PreparedStatement, String)insteadExecute 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
-
-