Class AbstractSqmExpression<T>
java.lang.Object
org.hibernate.query.sqm.tree.AbstractSqmNode
org.hibernate.query.sqm.tree.jpa.AbstractJpaTupleElement<T>
org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection<T>
org.hibernate.query.sqm.tree.expression.AbstractSqmExpression<T>
- All Implemented Interfaces:
Expression<T>,Selection<T>,TupleElement<T>,Serializable,JpaCriteriaNode,JpaExpression<T>,JpaSelection<T>,JpaTupleElement<T>,SqmExpression<T>,SqmSelectableNode<T>,SqmExpressibleAccessor<T>,SqmNode,SqmTypedNode<T>,SqmVisitableNode
- Direct Known Subclasses:
AbstractSqmParameter,AbstractSqmPath,AbstractSqmPredicate,AsWrapperSqmExpression,JpaCriteriaParameter,SqmAliasedNodeRef,SqmAny,SqmAnyDiscriminatorValue,SqmBinaryArithmetic,SqmByUnit,SqmCaseSearched,SqmCaseSimple,SqmCoalesce,SqmCollectionSize,SqmEvery,SqmFunction,SqmJpaCompoundSelection,SqmJpaCriteriaParameterWrapper,SqmLiteral,SqmLiteralEmbeddableType,SqmLiteralEntityType,SqmModifiedSubQueryExpression,SqmOver,SqmOverflow,SqmParameterizedEntityType,SqmSelfRenderingExpression,SqmStar,SqmSummarization,SqmToDuration,SqmTuple,SqmUnaryOperation
public abstract class AbstractSqmExpression<T>
extends AbstractJpaSelection<T>
implements SqmExpression<T>
- Author:
- Steve Ebersole
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractSqmExpression(@Nullable SqmExpressible<? super T> type, NodeBuilder criteriaBuilder) -
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()equalTo(Expression<T> that) 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.protected voidinternalApplyInferableType(@Nullable SqmExpressible<?> newType) Create a predicate to test whether the expression is not null.isNull()Create a predicate to test whether the expression is null.Methods inherited from class org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection
alias, getSelectionItems, isCompoundSelectionMethods inherited from class org.hibernate.query.sqm.tree.jpa.AbstractJpaTupleElement
copyTo, getAlias, getNodeType, setAlias, setExpressibleTypeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.query.criteria.JpaSelection
alias, getCompoundSelectionItems, getSelectionItemsMethods inherited from interface org.hibernate.query.criteria.JpaTupleElement
getJavaType, getJavaTypeName, isEnumMethods inherited from interface jakarta.persistence.criteria.Selection
isCompoundSelectionMethods inherited from interface org.hibernate.query.sqm.tree.expression.SqmExpression
cast, castAs, copy, getNodeType, visitSubSelectableNodesMethods inherited from interface org.hibernate.query.sqm.tree.SqmNode
asLoggableTextMethods 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
-
Constructor Details
-
AbstractSqmExpression
-
-
Method Details
-
nodeBuilder
- Specified by:
nodeBuilderin interfaceSqmNode- Overrides:
nodeBuilderin classAbstractSqmNode
-
applyInferableType
Description copied from interface:SqmExpressionUsed to apply type information based on the expression's usage within the query.- Specified by:
applyInferableTypein interfaceSqmExpression<T>
-
internalApplyInferableType
-
asLong
- Specified by:
asLongin interfaceJpaExpression<T>- Specified by:
asLongin interfaceSqmExpression<T>
-
asInteger
- Specified by:
asIntegerin interfaceJpaExpression<T>- Specified by:
asIntegerin interfaceSqmExpression<T>
-
asFloat
- Specified by:
asFloatin interfaceJpaExpression<T>- Specified by:
asFloatin interfaceSqmExpression<T>
-
asDouble
- Specified by:
asDoublein interfaceJpaExpression<T>- Specified by:
asDoublein interfaceSqmExpression<T>
-
asBigDecimal
- Specified by:
asBigDecimalin interfaceJpaExpression<T>- Specified by:
asBigDecimalin interfaceSqmExpression<T>
-
asBigInteger
- Specified by:
asBigIntegerin interfaceJpaExpression<T>- Specified by:
asBigIntegerin interfaceSqmExpression<T>
-
asString
- Specified by:
asStringin interfaceJpaExpression<T>- Specified by:
asStringin interfaceSqmExpression<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>- Specified by:
asin interfaceSqmExpression<T>- Parameters:
type- intended type of the expression- Returns:
- new expression of the given type
-
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>- Specified by:
isNullin interfaceSqmExpression<T>- Returns:
- predicate testing whether the expression is null
-
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>- Specified by:
isNotNullin interfaceSqmExpression<T>- Returns:
- predicate testing whether the expression is not null
-
equalTo
- Specified by:
equalToin interfaceJpaExpression<T>- Specified by:
equalToin interfaceSqmExpression<T>
-
equalTo
- Specified by:
equalToin interfaceJpaExpression<T>- Specified by:
equalToin interfaceSqmExpression<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>- Specified by:
inin interfaceSqmExpression<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>- Specified by:
inin interfaceSqmExpression<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>- Specified by:
inin interfaceSqmExpression<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>- Specified by:
inin interfaceSqmExpression<T>- Parameters:
values- expression corresponding to collection to be tested against- Returns:
- predicate testing for membership
-
getJavaTypeDescriptor
- Specified by:
getJavaTypeDescriptorin interfaceJpaTupleElement<T>
-