HHH-12695 Rename org.hibernate.query.QueryParameter#getType to getHibernateType
Because it conflicts with the Class-returning getType method we want to re-introduce in ParameterRegistration to restore backward compatibility.
This commit is contained in:
parent
c26ac23a7b
commit
68ad2130e8
|
@ -42,7 +42,7 @@ public abstract class AbstractParameterDescriptor implements QueryParameter {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Type getType() {
|
||||
public Type getHibernateType() {
|
||||
return getExpectedType();
|
||||
}
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ public interface ParameterRegistrationImplementor<T> extends ParameterRegistrati
|
|||
*
|
||||
* @return The Hibernate Type
|
||||
*/
|
||||
@Override
|
||||
Type getHibernateType();
|
||||
|
||||
/**
|
||||
|
|
|
@ -21,7 +21,7 @@ public interface QueryParameter<T> extends javax.persistence.Parameter<T> {
|
|||
*
|
||||
* @return The Hibernate Type.
|
||||
*/
|
||||
Type getType();
|
||||
Type getHibernateType();
|
||||
|
||||
int[] getSourceLocations();
|
||||
|
||||
|
|
|
@ -840,7 +840,7 @@ public abstract class AbstractProducedQuery<R> implements QueryImplementor<R> {
|
|||
protected Type determineType(String namedParam, Class retType) {
|
||||
Type type = getQueryParameterBindings().getBinding( namedParam ).getBindType();
|
||||
if ( type == null ) {
|
||||
type = getParameterMetadata().getQueryParameter( namedParam ).getType();
|
||||
type = getParameterMetadata().getQueryParameter( namedParam ).getHibernateType();
|
||||
}
|
||||
if ( type == null ) {
|
||||
type = getProducer().getFactory().resolveParameterBindType( retType );
|
||||
|
|
|
@ -119,7 +119,7 @@ public class QueryParameterBindingsImpl implements QueryParameterBindings {
|
|||
);
|
||||
}
|
||||
|
||||
final QueryParameterBinding binding = makeBinding( queryParameter.getType() );
|
||||
final QueryParameterBinding binding = makeBinding( queryParameter.getHibernateType() );
|
||||
parameterBindingMap.put( queryParameter, binding );
|
||||
|
||||
return binding;
|
||||
|
@ -145,7 +145,7 @@ public class QueryParameterBindingsImpl implements QueryParameterBindings {
|
|||
return parameterListBindingMap.computeIfAbsent(
|
||||
param,
|
||||
p -> new QueryParameterListBindingImpl(
|
||||
param.getType(),
|
||||
param.getHibernateType(),
|
||||
shouldValidateBindingValue()
|
||||
)
|
||||
);
|
||||
|
@ -606,7 +606,7 @@ public class QueryParameterBindingsImpl implements QueryParameterBindings {
|
|||
|
||||
syntheticParam = new NamedParameterDescriptor(
|
||||
syntheticName,
|
||||
sourceParam.getType(),
|
||||
sourceParam.getHibernateType(),
|
||||
sourceParam.getSourceLocations()
|
||||
);
|
||||
}
|
||||
|
@ -624,7 +624,7 @@ public class QueryParameterBindingsImpl implements QueryParameterBindings {
|
|||
syntheticParam = new OrdinalParameterDescriptor(
|
||||
syntheticPosition,
|
||||
syntheticPosition - jdbcStyleOrdinalCountBase,
|
||||
sourceParam.getType(),
|
||||
sourceParam.getHibernateType(),
|
||||
sourceParam.getSourceLocations()
|
||||
);
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ public abstract class QueryParameterImpl<T> implements QueryParameter<T> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Type getType() {
|
||||
public Type getHibernateType() {
|
||||
return expectedType;
|
||||
}
|
||||
|
||||
|
|
|
@ -118,11 +118,6 @@ public class ProcedureParameterImpl<T>
|
|||
return position;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Type getHibernateType() {
|
||||
return getType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setHibernateType(Type expectedType) {
|
||||
super.setHibernateType( expectedType );
|
||||
|
|
Loading…
Reference in New Issue