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>
-
-
Constructor Summary
Constructors Constructor Description AbstractQueryParameter(boolean allowMultiValuedBinding, BindableType<T> anticipatedType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allowsMultiValuedBinding()
Does this parameter allow multi-valued (collection, array, etc) binding?void
applyAnticipatedType(BindableType type)
void
disallowMultiValuedBinding()
BindableType<T>
getHibernateType()
Get the Hibernate Type associated with this parameter, if one.String
getName()
Class<T>
getParameterType()
Integer
getPosition()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.query.spi.QueryParameterImplementor
toMemento
-
-
-
-
Constructor Detail
-
AbstractQueryParameter
public AbstractQueryParameter(boolean allowMultiValuedBinding, BindableType<T> anticipatedType)
-
-
Method Detail
-
disallowMultiValuedBinding
public void disallowMultiValuedBinding()
- Specified by:
disallowMultiValuedBinding
in interfaceQueryParameterImplementor<T>
-
allowsMultiValuedBinding
public boolean allowsMultiValuedBinding()
Description copied from interface:QueryParameter
Does 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:
allowsMultiValuedBinding
in interfaceQueryParameter<T>
- Returns:
true
indicates that multi-valued binding is allowed for this parameter
-
getHibernateType
public BindableType<T> getHibernateType()
Description copied from interface:QueryParameter
Get the Hibernate Type associated with this parameter, if one. May returnnull
.- Specified by:
getHibernateType
in interfaceQueryParameter<T>
- Returns:
- The associated Hibernate Type, may be
null
.
-
applyAnticipatedType
public void applyAnticipatedType(BindableType type)
- Specified by:
applyAnticipatedType
in interfaceQueryParameterImplementor<T>
-
getPosition
public Integer getPosition()
- Specified by:
getPosition
in interfaceParameter<T>
-
getParameterType
public Class<T> getParameterType()
- Specified by:
getParameterType
in interfaceParameter<T>
-
-