Interface SqmParameter<T>

All Superinterfaces:
Comparable<SqmParameter<T>>, Expression<T>, JpaCriteriaNode, JpaExpression<T>, JpaParameterExpression<T>, JpaSelection<T>, JpaTupleElement<T>, Parameter<T>, ParameterExpression<T>, Selection<T>, Serializable, SqmExpressibleAccessor<T>, SqmExpression<T>, SqmNode, SqmSelectableNode<T>, SqmTypedNode<T>, SqmVisitableNode, TupleElement<T>
All Known Implementing Classes:
AbstractSqmParameter, JpaCriteriaParameter, SqmJpaCriteriaParameterWrapper, SqmNamedParameter, SqmPositionalParameter, ValueBindJpaCriteriaParameter

public interface SqmParameter<T> extends SqmExpression<T>, JpaParameterExpression<T>, Comparable<SqmParameter<T>>
Models a parameter expression declared in the query.
Author:
Steve Ebersole
  • Method Details

    • getName

      String getName()
      If this represents a named parameter, return that parameter name; otherwise return null.
      Specified by:
      getName in interface Parameter<T>
      Returns:
      The parameter name, or null if not a named parameter
    • getPosition

      Integer getPosition()
      If this represents a positional parameter, return that parameter position; otherwise return null.
      Specified by:
      getPosition in interface 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:

      1. as the value of an IN predicate if the only value is a single param
      2. (in non-strict JPA mode) as the final vararg to a function
      Returns:
      true if binding collection/array of values is allowed for this parameter; false otherwise.
    • 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.
    • copy

      SqmParameter<T> copy()
      Make a copy
    • copy

      SqmParameter<T> copy(SqmCopyContext context)
      Specified by:
      copy in interface SqmExpression<T>
      Specified by:
      copy in interface SqmNode
      Specified by:
      copy in interface SqmSelectableNode<T>
      Specified by:
      copy in interface SqmTypedNode<T>
    • compareTo

      default int compareTo(SqmParameter<T> anotherParameter)
      Specified by:
      compareTo in interface Comparable<T>