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,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,SqmFunctionPath,SqmGroupedPredicate,SqmHqlNumericLiteral,SqmIndexAggregateFunction,SqmIndexedCollectionAccessPath,SqmInListPredicate,SqmInSubQueryPredicate,SqmJpaCompoundSelection,SqmJpaCriteriaParameterWrapper,SqmJunctionPredicate,SqmLikePredicate,SqmListJoin,SqmLiteral,SqmLiteralEmbeddableType,SqmLiteralEntityType,SqmLiteralNull,SqmMapJoin,SqmMemberOfPredicate,SqmModifiedSubQueryExpression,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,SqmTreatedSingularJoin,SqmTruthnessPredicate,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, 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 Detail
-
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:
getNodeTypein interfaceSqmTypedNode<T>
-
applyInferableType
@Internal void applyInferableType(@Nullable 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: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:
JpaSelection.getSelectionItems(),Selection.getCompoundSelectionItems()
-
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
<X> SqmExpression<X> as(Class<X> type)
- 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
SqmPredicate equalTo(Expression<T> that)
- Specified by:
equalToin interfaceJpaExpression<T>
-
equalTo
SqmPredicate equalTo(T that)
- Specified by:
equalToin interfaceJpaExpression<T>
-
in
SqmPredicate in(Object... values)
- Specified by:
inin interfaceExpression<T>- Specified by:
inin interfaceJpaExpression<T>
-
in
SqmPredicate in(Expression<?>... values)
- Specified by:
inin interfaceExpression<T>- Specified by:
inin interfaceJpaExpression<T>
-
in
SqmPredicate in(Collection<?> values)
- Specified by:
inin interfaceExpression<T>- Specified by:
inin interfaceJpaExpression<T>
-
in
SqmPredicate in(Expression<Collection<?>> values)
- Specified by:
inin interfaceExpression<T>- Specified by:
inin interfaceJpaExpression<T>
-
copy
SqmExpression<T> copy(SqmCopyContext context)
- Specified by:
copyin interfaceSqmNode- Specified by:
copyin interfaceSqmSelectableNode<T>- Specified by:
copyin interfaceSqmTypedNode<T>
-
castAs
default <X> SqmExpression<X> castAs(DomainType<X> type)
-
cast
default <X> SqmExpression<X> cast(Class<X> type)
- Specified by:
castin interfaceJpaExpression<T>
-
-