@@ -114,7 +114,7 @@ public class ProcedureCallImpl<R>
114
114
private FunctionReturnImpl <R > functionReturn ;
115
115
116
116
private final ProcedureParameterMetadataImpl parameterMetadata ;
117
- private final ProcedureParamBindings paramBindings ;
117
+ private final ProcedureParamBindings parameterBindings ;
118
118
119
119
private final ResultSetMapping resultSetMapping ;
120
120
@@ -136,7 +136,7 @@ public ProcedureCallImpl(SharedSessionContractImplementor session, String proced
136
136
this .procedureName = procedureName ;
137
137
138
138
this .parameterMetadata = new ProcedureParameterMetadataImpl ();
139
- this .paramBindings = new ProcedureParamBindings ( parameterMetadata , getSessionFactory () );
139
+ this .parameterBindings = new ProcedureParamBindings ( parameterMetadata , getSessionFactory () );
140
140
141
141
this .resultSetMapping = resolveResultSetMapping ( procedureName , true , session .getSessionFactory () );
142
142
@@ -158,7 +158,7 @@ public ProcedureCallImpl(SharedSessionContractImplementor session, String proced
158
158
this .procedureName = procedureName ;
159
159
160
160
this .parameterMetadata = new ProcedureParameterMetadataImpl ();
161
- this .paramBindings = new ProcedureParamBindings ( parameterMetadata , getSessionFactory () );
161
+ this .parameterBindings = new ProcedureParamBindings ( parameterMetadata , getSessionFactory () );
162
162
163
163
this .synchronizedQuerySpaces = new HashSet <>();
164
164
@@ -192,7 +192,7 @@ public ProcedureCallImpl(
192
192
this .procedureName = procedureName ;
193
193
194
194
this .parameterMetadata = new ProcedureParameterMetadataImpl ();
195
- this .paramBindings = new ProcedureParamBindings ( parameterMetadata , getSessionFactory () );
195
+ this .parameterBindings = new ProcedureParamBindings ( parameterMetadata , getSessionFactory () );
196
196
197
197
this .synchronizedQuerySpaces = new HashSet <>();
198
198
@@ -219,7 +219,7 @@ public ProcedureCallImpl(
219
219
this .procedureName = memento .getCallableName ();
220
220
221
221
this .parameterMetadata = new ProcedureParameterMetadataImpl ( memento , session );
222
- this .paramBindings = new ProcedureParamBindings ( parameterMetadata , getSessionFactory () );
222
+ this .parameterBindings = new ProcedureParamBindings ( parameterMetadata , getSessionFactory () );
223
223
224
224
this .synchronizedQuerySpaces = CollectionHelper .makeCopy ( memento .getQuerySpaces () );
225
225
@@ -251,7 +251,7 @@ public ProcedureCallImpl(
251
251
this .procedureName = memento .getCallableName ();
252
252
253
253
this .parameterMetadata = new ProcedureParameterMetadataImpl ( memento , session );
254
- this .paramBindings = new ProcedureParamBindings ( parameterMetadata , getSessionFactory () );
254
+ this .parameterBindings = new ProcedureParamBindings ( parameterMetadata , getSessionFactory () );
255
255
256
256
this .synchronizedQuerySpaces = CollectionHelper .makeCopy ( memento .getQuerySpaces () );
257
257
@@ -278,7 +278,7 @@ public ProcedureCallImpl(
278
278
this .procedureName = memento .getCallableName ();
279
279
280
280
this .parameterMetadata = new ProcedureParameterMetadataImpl ( memento , session );
281
- this .paramBindings = new ProcedureParamBindings ( parameterMetadata , getSessionFactory () );
281
+ this .parameterBindings = new ProcedureParamBindings ( parameterMetadata , getSessionFactory () );
282
282
283
283
this .synchronizedQuerySpaces = CollectionHelper .makeCopy ( memento .getQuerySpaces () );
284
284
@@ -344,7 +344,7 @@ public ProcedureParameterMetadataImpl getParameterMetadata() {
344
344
345
345
@ Override
346
346
public QueryParameterBindings getQueryParameterBindings () {
347
- return paramBindings ;
347
+ return parameterBindings ;
348
348
}
349
349
350
350
public ParameterStrategy getParameterStrategy () {
@@ -408,7 +408,7 @@ private void markAsFunctionCall(BasicType<?> basicType) {
408
408
409
409
@ Override
410
410
public QueryParameterBindings getParameterBindings () {
411
- return paramBindings ;
411
+ return parameterBindings ;
412
412
}
413
413
414
414
@ Override
@@ -1007,33 +1007,36 @@ else if ( resultList.size() > 1 ) {
1007
1007
}
1008
1008
1009
1009
@ Override
1010
- @ SuppressWarnings ("unchecked" )
1011
- public <T > T unwrap (Class <T > cls ) {
1012
- if ( cls .isInstance ( this ) ) {
1013
- return (T ) this ;
1010
+ public <T > T unwrap (Class <T > type ) {
1011
+ if ( type .isInstance ( this ) ) {
1012
+ return type .cast ( this );
1014
1013
}
1015
1014
1016
- if ( cls .isInstance ( parameterMetadata ) ) {
1017
- return ( T ) parameterMetadata ;
1015
+ if ( type .isInstance ( parameterMetadata ) ) {
1016
+ return type . cast ( parameterMetadata ) ;
1018
1017
}
1019
1018
1020
- if ( cls .isInstance ( paramBindings ) ) {
1021
- return ( T ) paramBindings ;
1019
+ if ( type .isInstance ( parameterBindings ) ) {
1020
+ return type . cast ( parameterBindings ) ;
1022
1021
}
1023
1022
1024
- if ( cls .isInstance ( queryOptions ) ) {
1025
- return ( T ) queryOptions ;
1023
+ if ( type .isInstance ( getQueryOptions () ) ) {
1024
+ return type . cast ( getQueryOptions () ) ;
1026
1025
}
1027
1026
1028
- if ( cls .isInstance ( getSession () ) ) {
1029
- return ( T ) getSession ( );
1027
+ if ( type .isInstance ( getQueryOptions (). getAppliedGraph () ) ) {
1028
+ return type . cast ( getQueryOptions (). getAppliedGraph () );
1030
1029
}
1031
1030
1032
- if ( ProcedureOutputs . class . isAssignableFrom ( cls ) ) {
1033
- return ( T ) getOutputs ( );
1031
+ if ( type . isInstance ( getSession () ) ) {
1032
+ return type . cast ( getSession () );
1034
1033
}
1035
1034
1036
- throw new PersistenceException ( "Unrecognized unwrap type : " + cls .getName () );
1035
+ if ( type .isInstance ( getOutputs () ) ) {
1036
+ return type .cast ( getOutputs () );
1037
+ }
1038
+
1039
+ throw new PersistenceException ( "Unrecognized unwrap type [" + type .getName () + "]" );
1037
1040
}
1038
1041
1039
1042
@ Override
0 commit comments