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,SqmCorrelatedCteJoin,SqmCorrelatedDerivedJoin,SqmCorrelatedDerivedRoot,SqmCorrelatedDerivedRootJoin,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 TypeMethodDescriptionvoidapplyInferableType(@Nullable SqmBindableType<?> 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 SqmBindableType<T> The expression's type.in(Expression<?>... values) in(Expression<Collection<?>> values) in(Collection<?> values) isNull()notEqualTo(Expression<?> value) notEqualTo(Object value) default voidvisitSubSelectableNodes(Consumer<SqmSelectableNode<?>> jpaSelectionConsumer) Visit each of this selectable's direct sub-selectables - used to support JPA'sSelectionmodel (which is really a "selectable", just poorly named and poorly definedMethods inherited from interface org.hibernate.query.criteria.JpaSelection
alias, getCompoundSelectionItems, getSelectionItemsMethods inherited from interface org.hibernate.query.criteria.JpaTupleElement
getJavaType, getJavaTypeDescriptor, getJavaTypeName, isEnumMethods inherited from interface jakarta.persistence.criteria.Selection
isCompoundSelectionMethods inherited from interface org.hibernate.query.sqm.tree.SqmNode
asLoggableText, nodeBuilderMethods inherited from interface org.hibernate.query.sqm.tree.select.SqmSelectableNode
getTupleLengthMethods inherited from interface org.hibernate.query.sqm.tree.SqmTypedNode
getExpressible, getNodeJavaTypeMethods inherited from interface org.hibernate.query.sqm.tree.SqmVisitableNode
accept, appendHqlString, toHqlStringMethods inherited from interface jakarta.persistence.TupleElement
getAlias
-
Method Details
-
getNodeType
@Nullable SqmBindableType<T> getNodeType()The expression's type.Can change as a result of calls to
applyInferableType(org.hibernate.query.sqm.SqmBindableType<?>)- Specified by:
getNodeTypein 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:SqmSelectableNodeVisit each of this selectable's direct sub-selectables - used to support JPA'sSelectionmodel (which is really a "selectable", just poorly named and poorly defined- Specified by:
visitSubSelectableNodesin interfaceSqmSelectableNode<T>- See Also:
-
asLong
SqmExpression<Long> asLong()- Specified by:
asLongin interfaceJpaExpression<T>
-
asInteger
SqmExpression<Integer> asInteger()- Specified by:
asIntegerin interfaceJpaExpression<T>
-
asFloat
SqmExpression<Float> asFloat()- Specified by:
asFloatin interfaceJpaExpression<T>
-
asDouble
SqmExpression<Double> asDouble()- Specified by:
asDoublein interfaceJpaExpression<T>
-
asBigDecimal
SqmExpression<BigDecimal> asBigDecimal()- Specified by:
asBigDecimalin interfaceJpaExpression<T>
-
asBigInteger
SqmExpression<BigInteger> asBigInteger()- Specified by:
asBigIntegerin interfaceJpaExpression<T>
-
asString
SqmExpression<String> asString()- Specified by:
asStringin interfaceJpaExpression<T>
-
as
- Specified by:
asin interfaceExpression<T>- Specified by:
asin interfaceJpaExpression<T>
-
isNull
SqmPredicate isNull()- Specified by:
isNullin interfaceExpression<T>- Specified by:
isNullin interfaceJpaExpression<T>
-
isNotNull
SqmPredicate isNotNull()- Specified by:
isNotNullin interfaceExpression<T>- Specified by:
isNotNullin interfaceJpaExpression<T>
-
equalTo
- Specified by:
equalToin interfaceExpression<T>- Specified by:
equalToin interfaceJpaExpression<T>
-
equalTo
- Specified by:
equalToin interfaceExpression<T>- Specified by:
equalToin interfaceJpaExpression<T>
-
in
- Specified by:
inin interfaceExpression<T>- Specified by:
inin interfaceJpaExpression<T>
-
in
- Specified by:
inin interfaceExpression<T>- Specified by:
inin interfaceJpaExpression<T>
-
in
- Specified by:
inin interfaceExpression<T>- Specified by:
inin interfaceJpaExpression<T>
-
in
- Specified by:
inin interfaceExpression<T>- Specified by:
inin interfaceJpaExpression<T>
-
copy
- Specified by:
copyin interfaceSqmNode- Specified by:
copyin interfaceSqmSelectableNode<T>- Specified by:
copyin interfaceSqmTypedNode<T>
-
castAs
-
cast
- Specified by:
castin interfaceExpression<T>- Specified by:
castin interfaceJpaExpression<T>
-
notEqualTo
- Specified by:
notEqualToin interfaceExpression<T>- Specified by:
notEqualToin interfaceJpaExpression<T>
-
notEqualTo
- Specified by:
notEqualToin interfaceExpression<T>- Specified by:
notEqualToin interfaceJpaExpression<T>
-