Interface SqmParameter<T>
- All Superinterfaces:
Expression<T>, JpaCriteriaNode, JpaExpression<T>, JpaParameterExpression<T>, JpaSelection<T>, JpaTupleElement<T>, Parameter<T>, ParameterExpression<T>, Selection<T>, Serializable, SqmCacheable, SqmExpressibleAccessor<T>, SqmExpression<T>, SqmNode, SqmSelectableNode<T>, SqmTypedNode<T>, SqmVisitableNode, TupleElement<T>
- All Known Implementing Classes:
AbstractSqmParameter, JpaCriteriaParameter, SqmJpaCriteriaParameterWrapper, SqmNamedParameter, SqmPositionalParameter, ValueBindJpaCriteriaParameter
Models a parameter expression declared in the query.
- Implementation Note:
- Each usage of a given named/positional query parameter
will result in a unique
SqmParameterinstance, each will simply use to the same binding. This is important to distinguish usage of the same parameter in different clauses which effects the rendering and value binding.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanCan a collection/array of values be bound to this parameter?copy()Make a copycopy(SqmCopyContext context) @Nullable BindableType<T> Based on the context it is declared, what is the anticipated type for bind values?@Nullable StringgetName()If this represents a named parameter, return that parameter name; otherwise returnnull.@Nullable IntegerIf this represents a positional parameter, return that parameter position; otherwise returnnull.Methods inherited from interface JpaSelection
alias, getCompoundSelectionItems, getSelectionItemsMethods inherited from interface JpaTupleElement
getJavaType, getJavaTypeDescriptor, getJavaTypeName, isEnumMethods inherited from interface Parameter
getParameterTypeMethods inherited from interface Selection
isCompoundSelectionMethods inherited from interface SqmCacheable
cacheHashCode, isCompatibleMethods inherited from interface SqmExpression
applyInferableType, as, asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString, cast, castAs, equalTo, equalTo, getNodeType, in, in, in, in, isNotNull, isNull, notEqualTo, notEqualTo, visitSubSelectableNodesMethods inherited from interface SqmNode
asLoggableText, nodeBuilderMethods inherited from interface SqmSelectableNode
getTupleLengthMethods inherited from interface SqmTypedNode
getExpressible, getNodeJavaTypeMethods inherited from interface SqmVisitableNode
accept, appendHqlString, toHqlStringMethods inherited from interface TupleElement
getAlias
-
Field Details
-
COMPARATOR
-
-
Method Details
-
getName
-
getPosition
@Nullable Integer getPosition()If this represents a positional parameter, return that parameter position; otherwise returnnull.- Specified by:
getPositionin interfaceParameter<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
@Nullable 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.
-
copy
SqmParameter<T> copy()Make a copy -
copy
- Specified by:
copyin interfaceSqmExpression<T>- Specified by:
copyin interfaceSqmNode- Specified by:
copyin interfaceSqmSelectableNode<T>- Specified by:
copyin interfaceSqmTypedNode<T>
-