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, SqmCacheable, SqmExpressibleAccessor<T>, SqmNode, SqmSelectableNode<T>, SqmTypedNode<T>, SqmVisitableNode, TupleElement<T>
- All Known Subinterfaces:
DiscriminatorSqmPath<T>, SqmAggregateFunction<T>, SqmAttributeJoin<O,T>, SqmBooleanExpression, SqmBooleanExpressionImplementor, SqmBooleanPath, SqmComparableExpression<C>, SqmComparableExpressionImplementor<C>, SqmCorrelatedJoin<L, R>, SqmCorrelatedSingularValuedJoin<L, R>, SqmCorrelation<L, R>, SqmExpressionWrapper<T>, SqmFrom<L, R>, SqmInPredicate<T>, SqmJoin<L, R>, SqmNegatablePredicate, SqmNumericExpression<N>, SqmNumericExpressionImplementor<N>, SqmNumericPath<N>, SqmOrderedSetAggregateFunction<T>, SqmParameter<T>, SqmPath<T>, SqmPathWrapper<W, T>, SqmPluralPath<C, E>, SqmPredicate, SqmSimplePath<T>, SqmSingularValuedJoin<L, R>, SqmTemporalExpression<T>, SqmTemporalExpressionImplementor<T>, SqmTemporalPath<T>, SqmTextExpression, SqmTextExpressionImplementor, SqmTextPath, 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, AsWrapperSqmExpression, FormatFunction.FormatSqmFunction, InverseDistributionFunction.SelfRenderingInverseDistributionFunction, JpaCriteriaParameter, NonAggregatedCompositeSimplePath, SelfRenderingSqmAggregateFunction, SelfRenderingSqmFunction, SelfRenderingSqmOrderedSetAggregateFunction, SelfRenderingSqmWindowFunction, SqmAliasedNodeRef, SqmAny, SqmAnyDiscriminatorValue, SqmAnyValuedSimplePath, SqmBagJoin, SqmBasicValuedSimplePath, SqmBetweenPredicate, SqmBinaryArithmetic, SqmBooleanExpressionPredicate, SqmBooleanExpressionWrapper, SqmBooleanValuedSimplePath, SqmByUnit, SqmCaseSearched, SqmCaseSimple, SqmCoalesce, SqmCollation, SqmCollectionSize, SqmComparableExpressionWrapper, SqmComparableValuedSimplePath, 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, SqmNumericExpressionWrapper, SqmNumericValuedSimplePath, SqmOver, SqmOverflow, SqmParameterizedEntityType, SqmPluralPartJoin, SqmPluralPartSelectionPath, SqmPluralValuedSimplePath, SqmPositionalParameter, SqmRoot, SqmSelfRenderingExpression, SqmSetJoin, SqmSingularJoin, SqmStar, SqmSubQuery, SqmSummarization, SqmTemporalExpressionWrapper, SqmTemporalValuedSimplePath, SqmTextExpressionWrapper, SqmTextValuedSimplePath, 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(SqmBindableType<?> type) Used to apply type information based on the expression's usage within the query.<X> SqmExpression<X> Narrow this expression to the given Java type.default SqmExpression<BigDecimal> Convert this expression to BigDecimal.default SqmExpression<BigInteger> Convert this expression to BigInteger.default SqmExpression<Double> asDouble()Convert this expression to Double.default SqmExpression<Float> asFloat()Convert this expression to Float.default SqmExpression<Integer> Convert this expression to Integer.default SqmExpression<Long> asLong()Convert this expression to Long.default SqmExpression<String> asString()Convert this expression to String.default <X> SqmExpression<X> Create a cast expression for this expression.default <X> SqmExpression<X> castAs(DomainType<X> type) copy(SqmCopyContext context) equalTo(Expression<?> value) Create a predicate testing equality with this expression.Create a predicate testing equality with this expression.The expression's type.in(Expression<?>... values) Create an in predicate for this expression.in(Expression<Collection<?>> values) Create an in predicate for this expression.Create an in predicate for this expression.in(Collection<?> values) Create an in predicate for this expression.Create a predicate testing whether this expression is not null.isNull()Create a predicate testing whether this expression is null.notEqualTo(Expression<?> value) Create a predicate testing inequality with this expression.notEqualTo(Object value) Create a predicate testing inequality with this expression.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 JpaExpression
coalesce, coalesce, count, countDistinct, in, isMember, isNotMember, nullif, nullif, selectCase, selectCaseMethods inherited from interface JpaSelection
alias, getCompoundSelectionItems, getSelectionItemsMethods inherited from interface JpaTupleElement
getJavaType, getJavaTypeDescriptor, getJavaTypeIfKnown, getJavaTypeName, isEnumMethods inherited from interface Selection
isCompoundSelectionMethods inherited from interface SqmCacheable
cacheHashCode, isCompatibleMethods 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
-
Method Details
-
getNodeType
The expression's type.Can change as a result of calls to
applyInferableType(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
Description copied from interface:JpaExpressionConvert this expression to Long.- Specified by:
asLongin interfaceJpaExpression<T>
-
asInteger
Description copied from interface:JpaExpressionConvert this expression to Integer.- Specified by:
asIntegerin interfaceJpaExpression<T>
-
asFloat
Description copied from interface:JpaExpressionConvert this expression to Float.- Specified by:
asFloatin interfaceJpaExpression<T>
-
asDouble
Description copied from interface:JpaExpressionConvert this expression to Double.- Specified by:
asDoublein interfaceJpaExpression<T>
-
asBigDecimal
Description copied from interface:JpaExpressionConvert this expression to BigDecimal.- Specified by:
asBigDecimalin interfaceJpaExpression<T>
-
asBigInteger
Description copied from interface:JpaExpressionConvert this expression to BigInteger.- Specified by:
asBigIntegerin interfaceJpaExpression<T>
-
asString
Description copied from interface:JpaExpressionConvert this expression to String.- Specified by:
asStringin interfaceJpaExpression<T>
-
as
Description copied from interface:JpaExpressionNarrow this expression to the given Java type.- Specified by:
asin interfaceExpression<T>- Specified by:
asin interfaceJpaExpression<T>
-
isNull
Description copied from interface:JpaExpressionCreate a predicate testing whether this expression is null.- Specified by:
isNullin interfaceExpression<T>- Specified by:
isNullin interfaceJpaExpression<T>
-
isNotNull
Description copied from interface:JpaExpressionCreate a predicate testing whether this expression is not null.- Specified by:
isNotNullin interfaceExpression<T>- Specified by:
isNotNullin interfaceJpaExpression<T>
-
equalTo
Description copied from interface:JpaExpressionCreate a predicate testing equality with this expression.- Specified by:
equalToin interfaceExpression<T>- Specified by:
equalToin interfaceJpaExpression<T>
-
equalTo
Description copied from interface:JpaExpressionCreate a predicate testing equality with this expression.- Specified by:
equalToin interfaceExpression<T>- Specified by:
equalToin interfaceJpaExpression<T>
-
in
Description copied from interface:JpaExpressionCreate an in predicate for this expression.- Specified by:
inin interfaceExpression<T>- Specified by:
inin interfaceJpaExpression<T>
-
in
Description copied from interface:JpaExpressionCreate an in predicate for this expression.- Specified by:
inin interfaceExpression<T>- Specified by:
inin interfaceJpaExpression<T>
-
in
Description copied from interface:JpaExpressionCreate an in predicate for this expression.- Specified by:
inin interfaceExpression<T>- Specified by:
inin interfaceJpaExpression<T>
-
in
Description copied from interface:JpaExpressionCreate an in predicate for this expression.- 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
Description copied from interface:JpaExpressionCreate a cast expression for this expression.- Specified by:
castin interfaceExpression<T>- Specified by:
castin interfaceJpaExpression<T>
-
notEqualTo
Description copied from interface:JpaExpressionCreate a predicate testing inequality with this expression.- Specified by:
notEqualToin interfaceExpression<T>- Specified by:
notEqualToin interfaceJpaExpression<T>
-
notEqualTo
Description copied from interface:JpaExpressionCreate a predicate testing inequality with this expression.- Specified by:
notEqualToin interfaceExpression<T>- Specified by:
notEqualToin interfaceJpaExpression<T>
-