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,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
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.
- Author:
- Steve Ebersole
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoidapplyInferableType(@Nullable SqmExpressible<?> type) Used to apply type information based on the expression's usage within the query.<X> SqmExpression<X>Perform a typecast upon the expression, returning a new expression object.asDouble()asFloat()asLong()asString()default <X> SqmExpression<X>default <X> SqmExpression<X>castAs(DomainType<X> type) copy(SqmCopyContext context) equalTo(Expression<T> that) @Nullable SqmExpressible<T>The expression's type.in(Expression<?>... values) Create a predicate to test whether the expression is a member of the argument list.in(Expression<Collection<?>> values) Create a predicate to test whether the expression is a member of the collection.Create a predicate to test whether the expression is a member of the argument list.in(Collection<?> values) Create a predicate to test whether the expression is a member of the collection.Create a predicate to test whether the expression is not null.isNull()Create a predicate to test whether the expression is null.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 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
Used to apply type information based on the expression's usage within the query. -
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
Description copied from interface:ExpressionPerform a typecast upon the expression, returning a new expression object. This method does not cause type conversion: the runtime type is not changed. Warning: may result in a runtime failure.- Specified by:
asin interfaceExpression<T>- Specified by:
asin interfaceJpaExpression<T>- Parameters:
type- intended type of the expression- Returns:
- new expression of the given type
-
isNull
SqmPredicate isNull()Description copied from interface:ExpressionCreate a predicate to test whether the expression is null.- Specified by:
isNullin interfaceExpression<T>- Specified by:
isNullin interfaceJpaExpression<T>- Returns:
- predicate testing whether the expression is null
-
isNotNull
SqmPredicate isNotNull()Description copied from interface:ExpressionCreate a predicate to test whether the expression is not null.- Specified by:
isNotNullin interfaceExpression<T>- Specified by:
isNotNullin interfaceJpaExpression<T>- Returns:
- predicate testing whether the expression is not null
-
equalTo
- Specified by:
equalToin interfaceJpaExpression<T>
-
equalTo
- Specified by:
equalToin interfaceJpaExpression<T>
-
in
Description copied from interface:ExpressionCreate a predicate to test whether the expression is a member of the argument list.- Specified by:
inin interfaceExpression<T>- Specified by:
inin interfaceJpaExpression<T>- Parameters:
values- values to be tested against- Returns:
- predicate testing for membership
-
in
Description copied from interface:ExpressionCreate a predicate to test whether the expression is a member of the argument list.- Specified by:
inin interfaceExpression<T>- Specified by:
inin interfaceJpaExpression<T>- Parameters:
values- expressions to be tested against- Returns:
- predicate testing for membership
-
in
Description copied from interface:ExpressionCreate a predicate to test whether the expression is a member of the collection.- Specified by:
inin interfaceExpression<T>- Specified by:
inin interfaceJpaExpression<T>- Parameters:
values- collection of values to be tested against- Returns:
- predicate testing for membership
-
in
Description copied from interface:ExpressionCreate a predicate to test whether the expression is a member of the collection.- Specified by:
inin interfaceExpression<T>- Specified by:
inin interfaceJpaExpression<T>- Parameters:
values- expression corresponding to collection to be tested against- Returns:
- predicate testing for membership
-
copy
- Specified by:
copyin interfaceSqmNode- Specified by:
copyin interfaceSqmSelectableNode<T>- Specified by:
copyin interfaceSqmTypedNode<T>
-
castAs
-
cast
- Specified by:
castin interfaceJpaExpression<T>
-