Package org.hibernate.query.spi
Class AbstractQueryParameter<T>
java.lang.Object
org.hibernate.query.spi.AbstractQueryParameter<T>
- All Implemented Interfaces:
Parameter<T>,QueryParameter<T>,QueryParameterImplementor<T>
- Direct Known Subclasses:
ProcedureParameterImpl,QueryParameterNamedImpl,QueryParameterPositionalImpl
public abstract class AbstractQueryParameter<T>
extends Object
implements QueryParameterImplementor<T>
- Author:
- Steve Ebersole
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractQueryParameter(boolean allowMultiValuedBinding, BindableType<T> anticipatedType) -
Method Summary
Modifier and TypeMethodDescriptionbooleanDoes this parameter allow multi-valued (collection, array, etc) binding?voidvoidGet the Hibernate Type associated with this parameter, if one.getName()Return the parameter name, or null if the parameter is not a named parameter or no name has been assigned.Return the Java type of the parameter.Return the parameter position, or null if the parameter is not a positional parameter.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.query.spi.QueryParameterImplementor
toMemento
-
Constructor Details
-
AbstractQueryParameter
-
-
Method Details
-
disallowMultiValuedBinding
public void disallowMultiValuedBinding()- Specified by:
disallowMultiValuedBindingin interfaceQueryParameterImplementor<T>
-
allowsMultiValuedBinding
public boolean allowsMultiValuedBinding()Description copied from interface:QueryParameterDoes this parameter allow multi-valued (collection, array, etc) binding?This is only valid for HQL/JPQL and (I think) Criteria queries, and is determined based on the context of the parameters declaration.
- Specified by:
allowsMultiValuedBindingin interfaceQueryParameter<T>- Returns:
trueindicates that multi-valued binding is allowed for this parameter
-
getHibernateType
Description copied from interface:QueryParameterGet the Hibernate Type associated with this parameter, if one. May returnnull.- Specified by:
getHibernateTypein interfaceQueryParameter<T>- Returns:
- The associated Hibernate Type, may be
null.
-
applyAnticipatedType
- Specified by:
applyAnticipatedTypein interfaceQueryParameterImplementor<T>
-
getName
Description copied from interface:ParameterReturn the parameter name, or null if the parameter is not a named parameter or no name has been assigned. -
getPosition
Description copied from interface:ParameterReturn the parameter position, or null if the parameter is not a positional parameter.- Specified by:
getPositionin interfaceParameter<T>- Returns:
- position of parameter
-
getParameterType
Description copied from interface:ParameterReturn the Java type of the parameter. Values bound to the parameter must be assignable to this type. This method is required to be supported for criteria queries only. Applications that use this method for Jakarta Persistence query language queries and native queries will not be portable.- Specified by:
getParameterTypein interfaceParameter<T>- Returns:
- the Java type of the parameter
-