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> SqmCorrelatedJoin<L,
,R> SqmCorrelatedSingularValuedJoin<L,
,R> SqmCorrelation<L,
,R> SqmFrom<L,
,R> SqmInPredicate<T>
,SqmJoin<L,
,R> SqmNegatablePredicate
,SqmOrderedSetAggregateFunction<T>
,SqmParameter<T>
,SqmPath<T>
,SqmPathWrapper<W,
,T> SqmPredicate
,SqmSimplePath<T>
,SqmSingularValuedJoin<L,
,R> SqmTreatedAttributeJoin<L,
,R, R1> SqmTreatedFrom<L,
,R, R1> SqmTreatedJoin<L,
,R, R1> SqmTreatedPath<T,
,S> SqmWindowFunction<T>
- All Known Implementing Classes:
AbstractNegatableSqmPredicate
,AbstractSqmAttributeJoin
,AbstractSqmExpression
,AbstractSqmFrom
,AbstractSqmJoin
,AbstractSqmJsonPathExpression
,AbstractSqmParameter
,AbstractSqmPath
,AbstractSqmPluralJoin
,AbstractSqmPredicate
,AbstractSqmSimplePath
,AbstractSqmSpecificPluralPartPath
,AnyDiscriminatorSqmPath
,AsWrapperSqmExpression
,EmbeddedDiscriminatorSqmPath
,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
,SqmFunctionJoin
,SqmFunctionPath
,SqmFunctionRoot
,SqmGroupedPredicate
,SqmHqlNumericLiteral
,SqmIndexAggregateFunction
,SqmIndexedCollectionAccessPath
,SqmInListPredicate
,SqmInSubQueryPredicate
,SqmJpaCompoundSelection
,SqmJpaCriteriaParameterWrapper
,SqmJsonExistsExpression
,SqmJsonQueryExpression
,SqmJsonValueExpression
,SqmJunctionPredicate
,SqmLikePredicate
,SqmListJoin
,SqmLiteral
,SqmLiteralEmbeddableType
,SqmLiteralEntityType
,SqmLiteralNull
,SqmMapJoin
,SqmMemberOfPredicate
,SqmModifiedSubQueryExpression
,SqmNamedExpression
,SqmNamedParameter
,SqmNegatedPredicate
,SqmNullnessPredicate
,SqmOver
,SqmOverflow
,SqmParameterizedEntityType
,SqmPluralPartJoin
,SqmPluralValuedSimplePath
,SqmPositionalParameter
,SqmRoot
,SqmSelfRenderingExpression
,SqmSetJoin
,SqmSingularJoin
,SqmStar
,SqmSubQuery
,SqmSummarization
,SqmToDuration
,SqmTreatedBagJoin
,SqmTreatedCrossJoin
,SqmTreatedEmbeddedValuedSimplePath
,SqmTreatedEntityJoin
,SqmTreatedEntityValuedSimplePath
,SqmTreatedListJoin
,SqmTreatedMapJoin
,SqmTreatedPluralPartJoin
,SqmTreatedRoot
,SqmTreatedSetJoin
,SqmTreatedSimplePath
,SqmTreatedSingularJoin
,SqmTruthnessPredicate
,SqmTuple
,SqmUnaryOperation
,SqmXmlElementExpression
,ValueBindJpaCriteriaParameter
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.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
applyInferableType
(@Nullable SqmExpressible<?> type) Used to apply type information based on the expression's usage within the query.<X> SqmExpression<X>
asDouble()
asFloat()
asLong()
asString()
default <X> SqmExpression<X>
default <X> SqmExpression<X>
castAs
(DomainType<X> type) copy
(SqmCopyContext context) equalTo
(Expression<?> value) @Nullable SqmExpressible<T>
The expression's type.in
(Expression<?>... values) in
(Expression<Collection<?>> values) in
(Collection<?> values) isNull()
notEqualTo
(Expression<?> value) notEqualTo
(Object value) default void
visitSubSelectableNodes
(Consumer<SqmSelectableNode<?>> jpaSelectionConsumer) 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 definedMethods inherited from interface org.hibernate.query.criteria.JpaSelection
alias, getCompoundSelectionItems, getSelectionItems
Methods inherited from interface org.hibernate.query.criteria.JpaTupleElement
getJavaType, getJavaTypeDescriptor, getJavaTypeName, isEnum
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.select.SqmSelectableNode
getTupleLength
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 Details
-
getNodeType
@Nullable SqmExpressible<T> getNodeType()The expression's type.Can change as a result of calls to
applyInferableType(org.hibernate.query.sqm.SqmExpressible<?>)
- Specified by:
getNodeType
in interfaceSqmTypedNode<T>
-
applyInferableType
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
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:
-
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
- 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>
-
equalTo
- Specified by:
equalTo
in interfaceExpression<T>
- Specified by:
equalTo
in interfaceJpaExpression<T>
-
equalTo
- Specified by:
equalTo
in interfaceExpression<T>
- Specified by:
equalTo
in interfaceJpaExpression<T>
-
in
- Specified by:
in
in interfaceExpression<T>
- Specified by:
in
in interfaceJpaExpression<T>
-
in
- Specified by:
in
in interfaceExpression<T>
- Specified by:
in
in interfaceJpaExpression<T>
-
in
- Specified by:
in
in interfaceExpression<T>
- Specified by:
in
in interfaceJpaExpression<T>
-
in
- Specified by:
in
in interfaceExpression<T>
- Specified by:
in
in interfaceJpaExpression<T>
-
copy
- Specified by:
copy
in interfaceSqmNode
- Specified by:
copy
in interfaceSqmSelectableNode<T>
- Specified by:
copy
in interfaceSqmTypedNode<T>
-
castAs
-
cast
- Specified by:
cast
in interfaceExpression<T>
- Specified by:
cast
in interfaceJpaExpression<T>
-
notEqualTo
- Specified by:
notEqualTo
in interfaceExpression<T>
- Specified by:
notEqualTo
in interfaceJpaExpression<T>
-
notEqualTo
- Specified by:
notEqualTo
in interfaceExpression<T>
- Specified by:
notEqualTo
in interfaceJpaExpression<T>
-