HHH-8413 - Rename ProcedureResults -> ProcedureOutputs
This commit is contained in:
parent
e42e786e8d
commit
cd812b6d65
|
@ -140,14 +140,14 @@ public interface ProcedureCall extends BasicQueryContract, SynchronizeableQuery
|
|||
|
||||
/**
|
||||
* Retrieves access to outputs of this procedure call. Can be called multiple times, returning the same
|
||||
* ProcedureResult instance each time.
|
||||
* ProcedureOutputs instance each time.
|
||||
* <p/>
|
||||
* If the procedure call has not actually be executed yet, it will be executed and then the ProcedureResult
|
||||
* If the procedure call has not actually be executed yet, it will be executed and then the ProcedureOutputs
|
||||
* will be returned.
|
||||
*
|
||||
* @return The ProcedureResult representation
|
||||
* @return The ProcedureOutputs representation
|
||||
*/
|
||||
public ProcedureOutputs getResult();
|
||||
public ProcedureOutputs getOutputs();
|
||||
|
||||
/**
|
||||
* Extract the disconnected representation of this call. Used in HEM to allow redefining a named query
|
||||
|
|
|
@ -370,7 +370,7 @@ public class ProcedureCallImpl extends AbstractBasicQueryContractImpl implements
|
|||
}
|
||||
|
||||
@Override
|
||||
public ProcedureOutputs getResult() {
|
||||
public ProcedureOutputs getOutputs() {
|
||||
if ( outputs == null ) {
|
||||
outputs = buildOutputs();
|
||||
}
|
||||
|
|
|
@ -34,7 +34,6 @@ import javax.persistence.TemporalType;
|
|||
|
||||
import java.util.Date;
|
||||
|
||||
import org.hibernate.HibernateException;
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.hibernate.cfg.AvailableSettings;
|
||||
|
@ -142,7 +141,7 @@ public class StoredProcedureResultSetMappingTest extends BaseUnitTestCase {
|
|||
session.beginTransaction();
|
||||
|
||||
ProcedureCall call = session.createStoredProcedureCall( "allEmployeeNames", "id-fname-lname" );
|
||||
ProcedureOutputs outputs = call.getResult();
|
||||
ProcedureOutputs outputs = call.getOutputs();
|
||||
ResultSetOutput output = ExtraAssertions.assertTyping( ResultSetOutput.class, outputs.getCurrent() );
|
||||
assertEquals( 3, output.getResultList().size() );
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@ public class StoredProcedureTest extends BaseCoreFunctionalTestCase {
|
|||
session.beginTransaction();
|
||||
|
||||
ProcedureCall procedureCall = session.createStoredProcedureCall( "user");
|
||||
ProcedureOutputs procedureOutputs = procedureCall.getResult();
|
||||
ProcedureOutputs procedureOutputs = procedureCall.getOutputs();
|
||||
Output currentOutput = procedureOutputs.getCurrent();
|
||||
assertNotNull( currentOutput );
|
||||
ResultSetOutput resultSetReturn = assertTyping( ResultSetOutput.class, currentOutput );
|
||||
|
@ -187,7 +187,7 @@ public class StoredProcedureTest extends BaseCoreFunctionalTestCase {
|
|||
session.beginTransaction();
|
||||
|
||||
ProcedureCall query = session.createStoredProcedureCall( "findOneUser" );
|
||||
ProcedureOutputs procedureResult = query.getResult();
|
||||
ProcedureOutputs procedureResult = query.getOutputs();
|
||||
Output currentOutput = procedureResult.getCurrent();
|
||||
assertNotNull( currentOutput );
|
||||
ResultSetOutput resultSetReturn = assertTyping( ResultSetOutput.class, currentOutput );
|
||||
|
@ -206,7 +206,7 @@ public class StoredProcedureTest extends BaseCoreFunctionalTestCase {
|
|||
session.beginTransaction();
|
||||
|
||||
ProcedureCall query = session.createStoredProcedureCall( "findUsers" );
|
||||
ProcedureOutputs procedureResult = query.getResult();
|
||||
ProcedureOutputs procedureResult = query.getOutputs();
|
||||
Output currentOutput = procedureResult.getCurrent();
|
||||
assertNotNull( currentOutput );
|
||||
ResultSetOutput resultSetReturn = assertTyping( ResultSetOutput.class, currentOutput );
|
||||
|
@ -243,7 +243,7 @@ public class StoredProcedureTest extends BaseCoreFunctionalTestCase {
|
|||
ProcedureCall query = session.createStoredProcedureCall( "findUserRange" );
|
||||
query.registerParameter( "start", Integer.class, ParameterMode.IN ).bindValue( 1 );
|
||||
query.registerParameter( "end", Integer.class, ParameterMode.IN ).bindValue( 2 );
|
||||
ProcedureOutputs procedureResult = query.getResult();
|
||||
ProcedureOutputs procedureResult = query.getOutputs();
|
||||
Output currentOutput = procedureResult.getCurrent();
|
||||
assertNotNull( currentOutput );
|
||||
ResultSetOutput resultSetReturn = assertTyping( ResultSetOutput.class, currentOutput );
|
||||
|
@ -268,7 +268,7 @@ public class StoredProcedureTest extends BaseCoreFunctionalTestCase {
|
|||
ProcedureCall query = session.createStoredProcedureCall( "findUserRange" );
|
||||
query.registerParameter( 1, Integer.class, ParameterMode.IN ).bindValue( 1 );
|
||||
query.registerParameter( 2, Integer.class, ParameterMode.IN ).bindValue( 2 );
|
||||
ProcedureOutputs procedureResult = query.getResult();
|
||||
ProcedureOutputs procedureResult = query.getOutputs();
|
||||
Output currentOutput = procedureResult.getCurrent();
|
||||
assertNotNull( currentOutput );
|
||||
ResultSetOutput resultSetReturn = assertTyping( ResultSetOutput.class, currentOutput );
|
||||
|
@ -298,7 +298,7 @@ public class StoredProcedureTest extends BaseCoreFunctionalTestCase {
|
|||
query.registerParameter( 1, Integer.class, ParameterMode.IN );
|
||||
query.registerParameter( 2, Integer.class, ParameterMode.IN ).bindValue( 2 );
|
||||
try {
|
||||
query.getResult();
|
||||
query.getOutputs();
|
||||
fail( "Expecting failure due to missing parameter bind" );
|
||||
}
|
||||
catch (JDBCException expected) {
|
||||
|
@ -310,7 +310,7 @@ public class StoredProcedureTest extends BaseCoreFunctionalTestCase {
|
|||
query.registerParameter( "start", Integer.class, ParameterMode.IN );
|
||||
query.registerParameter( "end", Integer.class, ParameterMode.IN ).bindValue( 2 );
|
||||
try {
|
||||
query.getResult();
|
||||
query.getOutputs();
|
||||
fail( "Expecting failure due to missing parameter bind" );
|
||||
}
|
||||
catch (JDBCException expected) {
|
||||
|
|
|
@ -248,7 +248,7 @@ public class StoredProcedureQueryImpl extends BaseQueryImpl implements StoredPro
|
|||
|
||||
protected ProcedureOutputs outputs() {
|
||||
if ( procedureResult == null ) {
|
||||
procedureResult = procedureCall.getResult();
|
||||
procedureResult = procedureCall.getOutputs();
|
||||
}
|
||||
return procedureResult;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue