Package org.hibernate.engine.jdbc.spi
Interface ResultSetReturn
-
- All Known Implementing Classes:
ResultSetReturnImpl
public interface ResultSetReturn
Contract for extractingResultSet
s fromStatement
s, executing the statements, managing resources, and logging statement calls.Generally the methods here for dealing with
CallableStatement
are extremely limited- See Also:
JdbcCoordinator.getResultSetReturn()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description ResultSet
execute(PreparedStatement statement)
Deprecated, for removal: This API element is subject to removal in a future version.Useexecute(PreparedStatement, String)
insteadResultSet
execute(PreparedStatement statement, String sql)
Execute thePreparedStatement
return its firstResultSet
, if any.ResultSet
execute(Statement statement, String sql)
Performs the given SQL statement, returning its firstResultSet
, if any.int
executeUpdate(PreparedStatement statement)
Deprecated, for removal: This API element is subject to removal in a future version.UseexecuteUpdate(PreparedStatement, String)
insteadint
executeUpdate(PreparedStatement statement, String sql)
Execute thePreparedStatement
, returning its "affected row count".int
executeUpdate(Statement statement, String sql)
Execute the given SQL statement returning its "affected row count".ResultSet
extract(CallableStatement callableStatement)
Deprecated, for removal: This API element is subject to removal in a future version.Useextract(PreparedStatement, String)
insteadResultSet
extract(PreparedStatement statement)
Deprecated, for removal: This API element is subject to removal in a future version.Useextract(PreparedStatement, String)
insteadResultSet
extract(PreparedStatement statement, String sql)
Extract theResultSet
from thePreparedStatement
.ResultSet
extract(Statement statement, String sql)
Performs the given SQL statement, expecting aResultSet
in 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 theResultSet
from thePreparedStatement
.If client passes
CallableStatement
reference, this method callsextract(CallableStatement)
internally. Otherwise,PreparedStatement.executeQuery()
is called.- Parameters:
statement
- ThePreparedStatement
from which to extract theResultSet
- Returns:
- The extracted ResultSet
-
extract
ResultSet extract(PreparedStatement statement, String sql)
Extract theResultSet
from thePreparedStatement
.If client passes
CallableStatement
reference, this method callsextract(CallableStatement)
internally. Otherwise,PreparedStatement.executeQuery()
is called.- Parameters:
statement
- ThePreparedStatement
from 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 theResultSet
from 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
- TheCallableStatement
from which to extract theResultSet
- Returns:
- The extracted
ResultSet
-
extract
ResultSet extract(Statement statement, String sql)
Performs the given SQL statement, expecting aResultSet
in 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 thePreparedStatement
return its firstResultSet
, if any. If there is noResultSet
, returnsnull
- Parameters:
statement
- ThePreparedStatement
to execute- Returns:
- The extracted
ResultSet
, ornull
-
execute
ResultSet execute(PreparedStatement statement, String sql)
Execute thePreparedStatement
return its firstResultSet
, if any. If there is noResultSet
, returnsnull
- Parameters:
statement
- ThePreparedStatement
to 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
- ThePreparedStatement
to execute- Returns:
- The
PreparedStatement.executeUpdate()
result
-
executeUpdate
int executeUpdate(PreparedStatement statement, String sql)
Execute thePreparedStatement
, returning its "affected row count".- Parameters:
statement
- ThePreparedStatement
to 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 JDBCStatement
object to usesql
- The SQL to execute- Returns:
- The
Statement.executeUpdate(String)
result
-
-