-
Notifications
You must be signed in to change notification settings - Fork 3.5k
/
ProcedureOutputs.java
60 lines (56 loc) · 2.13 KB
/
ProcedureOutputs.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.procedure;
import org.hibernate.query.procedure.ProcedureParameter;
import org.hibernate.result.Outputs;
/**
* Specialization of the {@link Outputs} contract providing access to the stored procedure's registered
* output parameters.
*
* @author Steve Ebersole
*/
public interface ProcedureOutputs extends Outputs {
/**
* Retrieve the value of an OUTPUT parameter by the parameter's registration memento.
* <p>
* Should NOT be called for parameters registered as REF_CURSOR. REF_CURSOR parameters should be
* accessed via the returns (see {@link #goToNext()}
*
* @param parameter The parameter's registration memento.
*
* @return The output value.
*
* @see ProcedureCall#registerParameter(String, Class, jakarta.persistence.ParameterMode)
*/
<T> T getOutputParameterValue(ProcedureParameter<T> parameter);
/**
* Retrieve the value of an OUTPUT parameter by the name under which the parameter was registered.
*
* @param name The name under which the parameter was registered.
*
* @return The output value.
*
* @throws ParameterStrategyException If the ProcedureCall is defined using positional parameters
* @throws NoSuchParameterException If no parameter with that name exists
*
* @see ProcedureCall#registerParameter(String, Class, jakarta.persistence.ParameterMode)
*/
Object getOutputParameterValue(String name);
/**
* Retrieve the value of an OUTPUT parameter by the name position under which the parameter was registered.
*
* @param position The position at which the parameter was registered.
*
* @return The output value.
*
* @throws ParameterStrategyException If the ProcedureCall is defined using named parameters
* @throws NoSuchParameterException If no parameter with that position exists
*
* @see ProcedureCall#registerParameter(int, Class, jakarta.persistence.ParameterMode)
*/
Object getOutputParameterValue(int position);
}