Interface SqmParameter<T>
-
- All Superinterfaces:
jakarta.persistence.criteria.Expression<T>,JpaCriteriaNode,JpaExpression<T>,JpaParameterExpression<T>,JpaSelection<T>,JpaTupleElement<T>,jakarta.persistence.Parameter<T>,jakarta.persistence.criteria.ParameterExpression<T>,jakarta.persistence.criteria.Selection<T>,Serializable,SqmExpressibleAccessor<T>,SqmExpression<T>,SqmNode,SqmSelectableNode<T>,SqmTypedNode<T>,SqmVisitableNode,jakarta.persistence.TupleElement<T>
- All Known Implementing Classes:
AbstractSqmParameter,JpaCriteriaParameter,SqmJpaCriteriaParameterWrapper,SqmNamedParameter,SqmPositionalParameter,ValueBindJpaCriteriaParameter
public interface SqmParameter<T> extends SqmExpression<T>, JpaParameterExpression<T>
Models a parameter expression declared in the query.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanallowMultiValuedBinding()Can a collection/array of values be bound to this parameter?SqmParameter<T>copy()Make a copySqmParameter<T>copy(SqmCopyContext context)BindableType<T>getAnticipatedType()Based on the context it is declared, what is the anticipated type for bind values?StringgetName()If this represents a named parameter, return that parameter name; otherwise returnnull.SqmExpressible<T>getNodeType()The expression's type.IntegergetPosition()If this represents a positional parameter, return that parameter position; otherwise returnnull.-
Methods inherited from interface org.hibernate.query.criteria.JpaSelection
alias, getCompoundSelectionItems, getSelectionItems
-
Methods inherited from interface org.hibernate.query.criteria.JpaTupleElement
getJavaType, getJavaTypeDescriptor
-
Methods inherited from interface org.hibernate.query.sqm.tree.expression.SqmExpression
applyInferableType, as, asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString, castAs, in, in, in, in, isNotNull, isNull, visitSubSelectableNodes
-
Methods inherited from interface org.hibernate.query.sqm.tree.SqmNode
asLoggableText, nodeBuilder
-
Methods inherited from interface org.hibernate.query.sqm.tree.SqmTypedNode
getExpressible, getNodeJavaType
-
Methods inherited from interface org.hibernate.query.sqm.tree.SqmVisitableNode
accept, appendHqlString, toHqlString
-
-
-
-
Method Detail
-
getName
String getName()
If this represents a named parameter, return that parameter name; otherwise returnnull.- Specified by:
getNamein interfacejakarta.persistence.Parameter<T>- Returns:
- The parameter name, or
nullif not a named parameter
-
getPosition
Integer getPosition()
If this represents a positional parameter, return that parameter position; otherwise returnnull.- Specified by:
getPositionin interfacejakarta.persistence.Parameter<T>- Returns:
- The parameter position
-
allowMultiValuedBinding
boolean allowMultiValuedBinding()
Can a collection/array of values be bound to this parameter?This is allowed in very limited contexts within the query:
- as the value of an IN predicate if the only value is a single param
- (in non-strict JPA mode) as the final vararg to a function
- Returns:
trueif binding collection/array of values is allowed for this parameter;falseotherwise.
-
getAnticipatedType
BindableType<T> getAnticipatedType()
Based on the context it is declared, what is the anticipated type for bind values?NOTE: If
allowMultiValuedBinding()is true, this will indicate the Type of the individual values.- Returns:
- The anticipated Type.
-
getNodeType
SqmExpressible<T> getNodeType()
Description copied from interface:SqmExpressionThe expression's type. Can change as a result of calls toSqmExpression.applyInferableType(org.hibernate.query.sqm.SqmExpressible<?>)- Specified by:
getNodeTypein interfaceSqmExpression<T>- Specified by:
getNodeTypein interfaceSqmTypedNode<T>
-
copy
SqmParameter<T> copy()
Make a copy
-
copy
SqmParameter<T> copy(SqmCopyContext context)
- Specified by:
copyin interfaceSqmExpression<T>- Specified by:
copyin interfaceSqmNode- Specified by:
copyin interfaceSqmSelectableNode<T>- Specified by:
copyin interfaceSqmTypedNode<T>
-
-