Top Constructors Methods
org.hibernate.query.sqm.tree.expression

public abstract Class AbstractSqmExpression<T>

extends AbstractJpaSelection<T>
implements SqmExpression<T>
Class Inheritance
All Implemented Interfaces
org.hibernate.query.sqm.tree.expression.SqmExpression, org.hibernate.query.criteria.JpaExpression, jakarta.persistence.criteria.Expression, jakarta.persistence.criteria.Selection, jakarta.persistence.TupleElement, org.hibernate.query.criteria.JpaSelection, org.hibernate.query.criteria.JpaTupleElement, org.hibernate.query.criteria.JpaCriteriaNode, java.io.Serializable, org.hibernate.query.sqm.tree.select.SqmSelectableNode, org.hibernate.query.sqm.tree.SqmTypedNode, org.hibernate.query.sqm.tree.SqmVisitableNode, org.hibernate.query.sqm.tree.SqmNode, org.hibernate.query.sqm.tree.SqmExpressibleAccessor
Known Direct Subclasses
org.hibernate.query.sqm.tree.expression.AbstractSqmParameter, org.hibernate.query.sqm.tree.expression.JpaCriteriaParameter, org.hibernate.query.sqm.tree.expression.SqmAliasedNodeRef, org.hibernate.query.sqm.tree.expression.SqmAny, org.hibernate.query.sqm.tree.expression.SqmAnyDiscriminatorValue, org.hibernate.query.sqm.tree.expression.SqmBinaryArithmetic, org.hibernate.query.sqm.tree.expression.SqmByUnit, org.hibernate.query.sqm.tree.expression.SqmCaseSearched, org.hibernate.query.sqm.tree.expression.SqmCaseSimple, org.hibernate.query.sqm.tree.expression.SqmCollectionSize, org.hibernate.query.sqm.tree.expression.SqmEvery, org.hibernate.query.sqm.tree.expression.SqmFunction, org.hibernate.query.sqm.tree.expression.SqmJpaCriteriaParameterWrapper, org.hibernate.query.sqm.tree.expression.SqmLiteral, org.hibernate.query.sqm.tree.expression.SqmModifiedSubQueryExpression, org.hibernate.query.sqm.tree.expression.SqmOver, org.hibernate.query.sqm.tree.expression.SqmOverflow, org.hibernate.query.sqm.tree.expression.SqmParameterizedEntityType, org.hibernate.query.sqm.tree.expression.SqmSelfRenderingExpression, org.hibernate.query.sqm.tree.expression.SqmStar, org.hibernate.query.sqm.tree.expression.SqmSummarization, org.hibernate.query.sqm.tree.expression.SqmToDuration, org.hibernate.query.sqm.tree.expression.SqmTuple, org.hibernate.query.sqm.tree.expression.SqmUnaryOperation, org.hibernate.query.sqm.tree.predicate.AbstractSqmPredicate, org.hibernate.query.sqm.tree.select.SqmJpaCompoundSelection, org.hibernate.query.sqm.tree.domain.AbstractSqmPath, org.hibernate.query.sqm.tree.domain.SqmFkExpression, org.hibernate.query.sqm.tree.expression.SqmCoalesce, org.hibernate.query.sqm.tree.expression.SqmLiteralEntityType
Imports
java.math.BigDecimal, .BigInteger, java.util.Collection, org.hibernate.query.criteria.JpaSelection, org.hibernate.query.sqm.NodeBuilder, .SqmExpressible, .SqmTreeCreationLogger, org.hibernate.query.sqm.internal.SqmCriteriaNodeBuilder, org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection, org.hibernate.query.sqm.tree.predicate.SqmPredicate, org.hibernate.type.descriptor.java.JavaType, jakarta.persistence.criteria.Expression

Author
Steve Ebersole

Constructor Summary

AccessConstructor and Description
public
AbstractSqmExpression(SqmExpressible<? super T> type, NodeBuilder criteriaBuilder)

Method Summary

Modifier and TypeMethod and Description
public JpaSelection<T>
public void
applyInferableType(SqmExpressible<?> type)

Implements org.hibernate.query.sqm.tree.expression.SqmExpression.applyInferableType.

Used to apply type information based on the expression's usage within the query.
public <X> SqmExpression<X>
as(Class<X>
intended type of the expression
type
)

Implements org.hibernate.query.sqm.tree.expression.SqmExpression.as.

Perform a typecast upon the expression, returning a new expression object.
public SqmExpression<BigDecimal>
public SqmExpression<BigInteger>
public SqmExpression<Double>
public SqmExpression<Float>
public SqmExpression<Integer>
public SqmExpression<Long>
public SqmExpression<String>
private <B> SqmExpression<B>
castToBasicType(Class<B> javaType)

public SqmPredicate
public SqmPredicate
public JavaType<T>
public SqmPredicate
in(Object...
values to be tested against
values
)

Implements org.hibernate.query.sqm.tree.expression.SqmExpression.in.

Create a predicate to test whether the expression is a member of the argument list.
public SqmPredicate
in(Expression<?>...
expressions to be tested against
values
)

Implements org.hibernate.query.sqm.tree.expression.SqmExpression.in.

Create a predicate to test whether the expression is a member of the argument list.
public SqmPredicate
in(Collection<?>
collection of values to be tested against
values
)

Implements org.hibernate.query.sqm.tree.expression.SqmExpression.in.

Create a predicate to test whether the expression is a member of the collection.
public SqmPredicate
in(Expression<Collection<?>>
expression corresponding to collection to be tested against
values
)

Implements org.hibernate.query.sqm.tree.expression.SqmExpression.in.

Create a predicate to test whether the expression is a member of the collection.
protected void
public SqmPredicate
isNotNull()

Implements org.hibernate.query.sqm.tree.expression.SqmExpression.isNotNull.

Create a predicate to test whether the expression is not null.
public SqmPredicate
isNull()

Implements org.hibernate.query.sqm.tree.expression.SqmExpression.isNull.

Create a predicate to test whether the expression is null.
public SqmCriteriaNodeBuilder
Inherited from org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection:
getSelectionItemsisCompoundSelection

Constructor Detail

AbstractSqmExpressionback to summary
public AbstractSqmExpression(SqmExpressible<? super T> type, NodeBuilder criteriaBuilder)

Method Detail

aliasback to summary
public JpaSelection<T> alias(String name)

Overrides org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection.alias.

Implements org.hibernate.query.criteria.JpaSelection.alias, jakarta.persistence.criteria.Selection.alias.

Doc from jakarta.persistence.criteria.Selection.alias.

Assigns an alias to the selection item. Once assigned, an alias cannot be changed or reassigned. Returns the same selection item.

Parameters
name:String

alias

Returns:JpaSelection<T>

selection item

Annotations
@Override
applyInferableTypeback to summary
public void applyInferableType(SqmExpressible<?> type)

Implements org.hibernate.query.sqm.tree.expression.SqmExpression.applyInferableType.

Doc from org.hibernate.query.sqm.tree.expression.SqmExpression.applyInferableType.

Used to apply type information based on the expression's usage within the query.

Annotations
@Override
asback to summary
public <X> SqmExpression<X> as(Class<X> type)

Implements org.hibernate.query.sqm.tree.expression.SqmExpression.as.

Doc from jakarta.persistence.criteria.Expression.as.

Perform 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.

Parameters
type:Class<X>

intended type of the expression

Returns:SqmExpression<X>

new expression of the given type

Annotations
@Override
asBigDecimalback to summary
public SqmExpression<BigDecimal> asBigDecimal()

Implements org.hibernate.query.sqm.tree.expression.SqmExpression.asBigDecimal.

Annotations
@Override
asBigIntegerback to summary
public SqmExpression<BigInteger> asBigInteger()

Implements org.hibernate.query.sqm.tree.expression.SqmExpression.asBigInteger.

Annotations
@Override
asDoubleback to summary
public SqmExpression<Double> asDouble()

Implements org.hibernate.query.sqm.tree.expression.SqmExpression.asDouble.

Annotations
@Override
asFloatback to summary
public SqmExpression<Float> asFloat()

Implements org.hibernate.query.sqm.tree.expression.SqmExpression.asFloat.

Annotations
@Override
asIntegerback to summary
public SqmExpression<Integer> asInteger()

Implements org.hibernate.query.sqm.tree.expression.SqmExpression.asInteger.

Annotations
@Override
asLongback to summary
public SqmExpression<Long> asLong()

Implements org.hibernate.query.sqm.tree.expression.SqmExpression.asLong.

Annotations
@Override
asStringback to summary
public SqmExpression<String> asString()

Implements org.hibernate.query.sqm.tree.expression.SqmExpression.asString.

Annotations
@Override
castToBasicTypeback to summary
private <B> SqmExpression<B> castToBasicType(Class<B> javaType)
equalToback to summary
public SqmPredicate equalTo(Expression<T> that)

Implements org.hibernate.query.sqm.tree.expression.SqmExpression.equalTo, org.hibernate.query.sqm.tree.expression.SqmExpression.equalTo.

Annotations
@Override
equalToback to summary
public SqmPredicate equalTo(T that)

Implements org.hibernate.query.sqm.tree.expression.SqmExpression.equalTo.

Annotations
@Override
getJavaTypeDescriptorback to summary
public JavaType<T> getJavaTypeDescriptor()

Implements org.hibernate.query.criteria.JpaTupleElement.getJavaTypeDescriptor.

Annotations
@Override
inback to summary
public SqmPredicate in(Object... values)

Implements org.hibernate.query.sqm.tree.expression.SqmExpression.in.

Doc from jakarta.persistence.criteria.Expression.in.

Create a predicate to test whether the expression is a member of the argument list.

Parameters
values:Object[]

values to be tested against

Returns:SqmPredicate

predicate testing for membership

Annotations
@Override
inback to summary
public SqmPredicate in(Expression<?>... values)

Implements org.hibernate.query.sqm.tree.expression.SqmExpression.in.

Doc from jakarta.persistence.criteria.Expression.in.

Create a predicate to test whether the expression is a member of the argument list.

Parameters
values:Expression<?>[]

expressions to be tested against

Returns:SqmPredicate

predicate testing for membership

Annotations
@Override
inback to summary
public SqmPredicate in(Collection<?> values)

Implements org.hibernate.query.sqm.tree.expression.SqmExpression.in.

Doc from jakarta.persistence.criteria.Expression.in.

Create a predicate to test whether the expression is a member of the collection.

Parameters
values:Collection<?>

collection of values to be tested against

Returns:SqmPredicate

predicate testing for membership

Annotations
@Override
inback to summary
public SqmPredicate in(Expression<Collection<?>> values)

Implements org.hibernate.query.sqm.tree.expression.SqmExpression.in.

Doc from jakarta.persistence.criteria.Expression.in.

Create a predicate to test whether the expression is a member of the collection.

Parameters
values:Expression<Collection<?>>

expression corresponding to collection to be tested against

Returns:SqmPredicate

predicate testing for membership

Annotations
@Override
internalApplyInferableTypeback to summary
protected void internalApplyInferableType(SqmExpressible<?> newType)
isNotNullback to summary
public SqmPredicate isNotNull()

Implements org.hibernate.query.sqm.tree.expression.SqmExpression.isNotNull.

Doc from jakarta.persistence.criteria.Expression.isNotNull.

Create a predicate to test whether the expression is not null.

Returns:SqmPredicate

predicate testing whether the expression is not null

Annotations
@Override
isNullback to summary
public SqmPredicate isNull()

Implements org.hibernate.query.sqm.tree.expression.SqmExpression.isNull.

Doc from jakarta.persistence.criteria.Expression.isNull.

Create a predicate to test whether the expression is null.

Returns:SqmPredicate

predicate testing whether the expression is null

Annotations
@Override
nodeBuilderback to summary
public SqmCriteriaNodeBuilder nodeBuilder()

Overrides org.hibernate.query.sqm.tree.AbstractSqmNode.nodeBuilder.

Implements org.hibernate.query.sqm.tree.SqmNode.nodeBuilder.

Annotations
@Override