Interface SqmExpression<T>
-
- Type Parameters:
T
- The Java type of the expression
- All Superinterfaces:
Expression<T>
,JpaCriteriaNode
,JpaExpression<T>
,JpaSelection<T>
,JpaTupleElement<T>
,Selection<T>
,Serializable
,SqmExpressibleAccessor<T>
,SqmNode
,SqmSelectableNode<T>
,SqmTypedNode<T>
,SqmVisitableNode
,TupleElement<T>
- All Known Subinterfaces:
DiscriminatorSqmPath<T>
,SqmAggregateFunction<T>
,SqmAttributeJoin<O,T>
,SqmCorrelation<O,T>
,SqmFrom<O,T>
,SqmInPredicate<T>
,SqmJoin<O,T>
,SqmNegatablePredicate
,SqmOrderedSetAggregateFunction<T>
,SqmParameter<T>
,SqmPath<T>
,SqmPathWrapper<W,T>
,SqmPredicate
,SqmQualifiedJoin<O,T>
,SqmSimplePath<T>
,SqmTreatedPath<T,S>
,SqmWindowFunction<T>
- All Known Implementing Classes:
AbstractNegatableSqmPredicate
,AbstractSqmAttributeJoin
,AbstractSqmExpression
,AbstractSqmFrom
,AbstractSqmJoin
,AbstractSqmParameter
,AbstractSqmPath
,AbstractSqmPluralJoin
,AbstractSqmPredicate
,AbstractSqmQualifiedJoin
,AbstractSqmSimplePath
,AbstractSqmSpecificPluralPartPath
,AnyDiscriminatorSqmPath
,EntityDiscriminatorSqmPath
,FormatFunction.FormatSqmFunction
,FullyQualifiedReflectivePathTerminal
,InverseDistributionFunction.SelfRenderingInverseDistributionFunction
,JpaCriteriaParameter
,NonAggregatedCompositeSimplePath
,SelfRenderingSqmAggregateFunction
,SelfRenderingSqmFunction
,SelfRenderingSqmOrderedSetAggregateFunction
,SelfRenderingSqmWindowFunction
,SqmAliasedNodeRef
,SqmAny
,SqmAnyDiscriminatorValue
,SqmAnyValuedSimplePath
,SqmBagJoin
,SqmBasicValuedSimplePath
,SqmBetweenPredicate
,SqmBinaryArithmetic
,SqmBooleanExpressionPredicate
,SqmByUnit
,SqmCaseSearched
,SqmCaseSimple
,SqmCoalesce
,SqmCollation
,SqmCollectionSize
,SqmComparisonPredicate
,SqmCorrelatedBagJoin
,SqmCorrelatedCrossJoin
,SqmCorrelatedEntityJoin
,SqmCorrelatedListJoin
,SqmCorrelatedMapJoin
,SqmCorrelatedPluralPartJoin
,SqmCorrelatedRoot
,SqmCorrelatedRootJoin
,SqmCorrelatedSetJoin
,SqmCorrelatedSingularJoin
,SqmCrossJoin
,SqmCteJoin
,SqmCteRoot
,SqmDerivedJoin
,SqmDerivedRoot
,SqmElementAggregateFunction
,SqmEmbeddedValuedSimplePath
,SqmEmptinessPredicate
,SqmEntityJoin
,SqmEntityValuedSimplePath
,SqmEnumLiteral
,SqmEvery
,SqmExistsPredicate
,SqmFieldLiteral
,SqmFkExpression
,SqmFormat
,SqmFunction
,SqmGroupedPredicate
,SqmIndexAggregateFunction
,SqmIndexedCollectionAccessPath
,SqmInListPredicate
,SqmInSubQueryPredicate
,SqmJpaCompoundSelection
,SqmJpaCriteriaParameterWrapper
,SqmJunctionPredicate
,SqmLikePredicate
,SqmListJoin
,SqmLiteral
,SqmLiteralEntityType
,SqmLiteralNull
,SqmMapJoin
,SqmMemberOfPredicate
,SqmModifiedSubQueryExpression
,SqmNamedParameter
,SqmNegatedPredicate
,SqmNullnessPredicate
,SqmOver
,SqmOverflow
,SqmParameterizedEntityType
,SqmPluralPartJoin
,SqmPluralValuedSimplePath
,SqmPositionalParameter
,SqmRoot
,SqmSelfRenderingExpression
,SqmSetJoin
,SqmSingularJoin
,SqmStar
,SqmSubQuery
,SqmSummarization
,SqmToDuration
,SqmTreatedBagJoin
,SqmTreatedCrossJoin
,SqmTreatedEntityJoin
,SqmTreatedListJoin
,SqmTreatedMapJoin
,SqmTreatedPluralPartJoin
,SqmTreatedRoot
,SqmTreatedSetJoin
,SqmTreatedSimplePath
,SqmTreatedSingularJoin
,SqmTuple
,SqmUnaryOperation
,ValueBindJpaCriteriaParameter
public interface SqmExpression<T> extends SqmSelectableNode<T>, JpaExpression<T>
The base contract for any kind of expression node in the SQM tree. An expression might be a reference to an attribute, a literal, a function, etc.
-
-
Method Summary
-
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 jakarta.persistence.criteria.Selection
isCompoundSelection
-
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
-
Methods inherited from interface jakarta.persistence.TupleElement
getAlias
-
-
-
-
Method Detail
-
getNodeType
SqmExpressible<T> getNodeType()
The expression's type. Can change as a result of calls toapplyInferableType(org.hibernate.query.sqm.SqmExpressible<?>)
- Specified by:
getNodeType
in interfaceSqmTypedNode<T>
-
applyInferableType
@Internal void applyInferableType(SqmExpressible<?> type)
Used to apply type information based on the expression's usage within the query.- API Note:
- The SqmExpressible type parameter is dropped here because the inference could technically cause a change in Java type (i.e. an implicit cast)
-
visitSubSelectableNodes
default void visitSubSelectableNodes(Consumer<SqmSelectableNode<?>> jpaSelectionConsumer)
Description copied from interface:SqmSelectableNode
Visit each of this selectable's direct sub-selectables - used to support JPA'sSelection
model (which is really a "selectable", just poorly named and poorly defined- Specified by:
visitSubSelectableNodes
in interfaceSqmSelectableNode<T>
- See Also:
JpaSelection.getSelectionItems()
,Selection.getCompoundSelectionItems()
-
asLong
SqmExpression<Long> asLong()
- Specified by:
asLong
in interfaceJpaExpression<T>
-
asInteger
SqmExpression<Integer> asInteger()
- Specified by:
asInteger
in interfaceJpaExpression<T>
-
asFloat
SqmExpression<Float> asFloat()
- Specified by:
asFloat
in interfaceJpaExpression<T>
-
asDouble
SqmExpression<Double> asDouble()
- Specified by:
asDouble
in interfaceJpaExpression<T>
-
asBigDecimal
SqmExpression<BigDecimal> asBigDecimal()
- Specified by:
asBigDecimal
in interfaceJpaExpression<T>
-
asBigInteger
SqmExpression<BigInteger> asBigInteger()
- Specified by:
asBigInteger
in interfaceJpaExpression<T>
-
asString
SqmExpression<String> asString()
- Specified by:
asString
in interfaceJpaExpression<T>
-
as
<X> SqmExpression<X> as(Class<X> type)
- Specified by:
as
in interfaceExpression<T>
- Specified by:
as
in interfaceJpaExpression<T>
-
isNull
SqmPredicate isNull()
- Specified by:
isNull
in interfaceExpression<T>
- Specified by:
isNull
in interfaceJpaExpression<T>
-
isNotNull
SqmPredicate isNotNull()
- Specified by:
isNotNull
in interfaceExpression<T>
- Specified by:
isNotNull
in interfaceJpaExpression<T>
-
in
SqmPredicate in(Object... values)
- Specified by:
in
in interfaceExpression<T>
- Specified by:
in
in interfaceJpaExpression<T>
-
in
SqmPredicate in(Expression<?>... values)
- Specified by:
in
in interfaceExpression<T>
- Specified by:
in
in interfaceJpaExpression<T>
-
in
SqmPredicate in(Collection<?> values)
- Specified by:
in
in interfaceExpression<T>
- Specified by:
in
in interfaceJpaExpression<T>
-
in
SqmPredicate in(Expression<Collection<?>> values)
- Specified by:
in
in interfaceExpression<T>
- Specified by:
in
in interfaceJpaExpression<T>
-
copy
SqmExpression<T> copy(SqmCopyContext context)
- Specified by:
copy
in interfaceSqmNode
- Specified by:
copy
in interfaceSqmSelectableNode<T>
- Specified by:
copy
in interfaceSqmTypedNode<T>
-
castAs
default <X> SqmExpression<X> castAs(DomainType<X> type)
-
-