Class ResultSetReturnImpl
- java.lang.Object
-
- org.hibernate.engine.jdbc.internal.ResultSetReturnImpl
-
- All Implemented Interfaces:
ResultSetReturn
public class ResultSetReturnImpl extends Object implements ResultSetReturn
Standard implementation of the ResultSetReturn contract
-
-
Constructor Summary
Constructors Constructor Description ResultSetReturnImpl(JdbcCoordinator jdbcCoordinator, JdbcServices jdbcServices)
Constructs a ResultSetReturnImpl
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResultSet
execute(PreparedStatement statement)
Execute the PreparedStatement return its first ResultSet, if any.ResultSet
execute(Statement statement, String sql)
Performs the given SQL statement, returning its first ResultSet, if any.int
executeUpdate(PreparedStatement statement)
Execute the PreparedStatement, 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)
Extract the ResultSet from the CallableStatement.ResultSet
extract(PreparedStatement statement)
Extract the ResultSet from the PreparedStatement.ResultSet
extract(Statement statement, String sql)
Performs the given SQL statement, expecting a ResultSet in return
-
-
-
Constructor Detail
-
ResultSetReturnImpl
public ResultSetReturnImpl(JdbcCoordinator jdbcCoordinator, JdbcServices jdbcServices)
Constructs a ResultSetReturnImpl- Parameters:
jdbcCoordinator
- The JdbcCoordinator
-
-
Method Detail
-
extract
public ResultSet extract(PreparedStatement statement)
Description copied from interface:ResultSetReturn
Extract the ResultSet from the PreparedStatement. If user passesCallableStatement
reference, this method callsResultSetReturn.extract(CallableStatement)
internally. Otherwise, generally speaking,PreparedStatement.executeQuery()
is called- Specified by:
extract
in interfaceResultSetReturn
- Parameters:
statement
- The PreparedStatement from which to extract the ResultSet- Returns:
- The extracted ResultSet
-
extract
public ResultSet extract(CallableStatement callableStatement)
Description copied from interface:ResultSetReturn
Extract the ResultSet from the CallableStatement. Note that this is the limited legacy form which delegates toDialect.getResultSet(java.sql.CallableStatement)
. Better option is to integrateProcedureCall
-like hooks- Specified by:
extract
in interfaceResultSetReturn
- Parameters:
callableStatement
- The CallableStatement from which to extract the ResultSet- Returns:
- The extracted ResultSet
-
extract
public ResultSet extract(Statement statement, String sql)
Description copied from interface:ResultSetReturn
Performs the given SQL statement, expecting a ResultSet in return- Specified by:
extract
in interfaceResultSetReturn
- Parameters:
statement
- The JDBC Statement object to usesql
- The SQL to execute- Returns:
- The resulting ResultSet
-
execute
public ResultSet execute(PreparedStatement statement)
Description copied from interface:ResultSetReturn
Execute the PreparedStatement return its first ResultSet, if any. If there is no ResultSet, returnsnull
- Specified by:
execute
in interfaceResultSetReturn
- Parameters:
statement
- The PreparedStatement to execute- Returns:
- The extracted ResultSet, or
null
-
execute
public ResultSet execute(Statement statement, String sql)
Description copied from interface:ResultSetReturn
Performs the given SQL statement, returning its first ResultSet, if any. If there is no ResultSet, returnsnull
- Specified by:
execute
in interfaceResultSetReturn
- Parameters:
statement
- The JDBC Statement object to usesql
- The SQL to execute- Returns:
- The extracted ResultSet, or
null
-
executeUpdate
public int executeUpdate(PreparedStatement statement)
Description copied from interface:ResultSetReturn
Execute the PreparedStatement, returning its "affected row count".- Specified by:
executeUpdate
in interfaceResultSetReturn
- Parameters:
statement
- The PreparedStatement to execute- Returns:
- The
PreparedStatement.executeUpdate()
result
-
executeUpdate
public int executeUpdate(Statement statement, String sql)
Description copied from interface:ResultSetReturn
Execute the given SQL statement returning its "affected row count".- Specified by:
executeUpdate
in interfaceResultSetReturn
- Parameters:
statement
- The JDBC Statement object to usesql
- The SQL to execute- Returns:
- The
Statement.executeUpdate(String)
result
-
-