Top Description Methods
org.hibernate.query.criteria

public Interface JpaExpression<T>

extends JpaSelection<T>, Expression<T>
Known Direct Subinterfaces
org.hibernate.query.criteria.JpaFunction, org.hibernate.query.criteria.JpaPath, org.hibernate.query.criteria.JpaPredicate, org.hibernate.query.criteria.JpaSearchedCase, org.hibernate.query.criteria.JpaSimpleCase, org.hibernate.query.criteria.JpaSubQuery, org.hibernate.query.sqm.tree.expression.SqmExpression, org.hibernate.query.criteria.JpaCoalesce
Imports
java.math.BigDecimal, .BigInteger, java.util.Collection, jakarta.persistence.criteria.Expression

API extension to the JPA Expression contract
Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public <X> JpaExpression<X>
as(Class<X>
intended type of the expression
type
)

Redeclares jakarta.persistence.criteria.Expression.as.

Perform a typecast upon the expression, returning a new expression object.
public JpaExpression<BigDecimal>
public JpaExpression<BigInteger>
public JpaExpression<Double>
public JpaExpression<Float>
public JpaExpression<Integer>
public JpaExpression<Long>
public JpaExpression<String>
public JpaPredicate
public JpaPredicate
equalTo(T that)

public JpaPredicate
in(Object...
values to be tested against
values
)

Redeclares jakarta.persistence.criteria.Expression.in.

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

Redeclares jakarta.persistence.criteria.Expression.in.

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

Redeclares jakarta.persistence.criteria.Expression.in.

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

Redeclares jakarta.persistence.criteria.Expression.in.

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

Redeclares jakarta.persistence.criteria.Expression.isNotNull.

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

Redeclares jakarta.persistence.criteria.Expression.isNull.

Create a predicate to test whether the expression is null.
Inherited from org.hibernate.query.criteria.JpaSelection:
aliasgetCompoundSelectionItemsgetSelectionItems

Method Detail

asback to summary
public <X> JpaExpression<X> as(Class<X> type)

Redeclares jakarta.persistence.criteria.Expression.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:JpaExpression<X>

new expression of the given type

Annotations
@Override
asBigDecimalback to summary
public JpaExpression<BigDecimal> asBigDecimal()
asBigIntegerback to summary
public JpaExpression<BigInteger> asBigInteger()
asDoubleback to summary
public JpaExpression<Double> asDouble()
asFloatback to summary
public JpaExpression<Float> asFloat()
asIntegerback to summary
public JpaExpression<Integer> asInteger()
asLongback to summary
public JpaExpression<Long> asLong()
asStringback to summary
public JpaExpression<String> asString()
equalToback to summary
public JpaPredicate equalTo(Expression<T> that)
equalToback to summary
public JpaPredicate equalTo(T that)
inback to summary
public JpaPredicate in(Object... values)

Redeclares jakarta.persistence.criteria.Expression.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:JpaPredicate

predicate testing for membership

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

Redeclares jakarta.persistence.criteria.Expression.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:JpaPredicate

predicate testing for membership

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

Redeclares jakarta.persistence.criteria.Expression.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:JpaPredicate

predicate testing for membership

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

Redeclares jakarta.persistence.criteria.Expression.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:JpaPredicate

predicate testing for membership

Annotations
@Override
isNotNullback to summary
public JpaPredicate isNotNull()

Redeclares jakarta.persistence.criteria.Expression.isNotNull.

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

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

Returns:JpaPredicate

predicate testing whether the expression is not null

Annotations
@Override
isNullback to summary
public JpaPredicate isNull()

Redeclares jakarta.persistence.criteria.Expression.isNull.

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

Create a predicate to test whether the expression is null.

Returns:JpaPredicate

predicate testing whether the expression is null

Annotations
@Override