Top Description Constructors Methods
org.hibernate.query.criteria.internal.expression

public abstract Class ExpressionImpl<T>

extends SelectionImpl<T>
implements ExpressionImplementor<T>, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, org.hibernate.query.criteria.internal.ExpressionImplementor, org.hibernate.query.criteria.internal.Renderable, javax.persistence.criteria.Expression, javax.persistence.criteria.Selection, javax.persistence.TupleElement, org.hibernate.query.criteria.internal.SelectionImplementor, org.hibernate.query.criteria.internal.TupleElementImplementor
Known Direct Subclasses
org.hibernate.query.criteria.internal.expression.ListIndexExpression, org.hibernate.query.criteria.internal.expression.LiteralExpression, org.hibernate.query.criteria.internal.expression.MapEntryExpression, org.hibernate.query.criteria.internal.expression.NullifExpression, org.hibernate.query.criteria.internal.expression.NullLiteralExpression, org.hibernate.query.criteria.internal.expression.ParameterExpressionImpl, org.hibernate.query.criteria.internal.expression.PathTypeExpression, org.hibernate.query.criteria.internal.expression.SearchedCaseExpression, org.hibernate.query.criteria.internal.expression.SimpleCaseExpression, org.hibernate.query.criteria.internal.expression.SizeOfPluralAttributeExpression, org.hibernate.query.criteria.internal.expression.SubqueryComparisonModifierExpression, org.hibernate.query.criteria.internal.expression.UnaryArithmeticOperation, org.hibernate.query.criteria.internal.expression.function.BasicFunctionExpression, org.hibernate.query.criteria.internal.path.AbstractPathImpl, org.hibernate.query.criteria.internal.predicate.AbstractPredicateImpl, org.hibernate.query.criteria.internal.predicate.NegatedPredicateWrapper, org.hibernate.query.criteria.internal.CriteriaSubqueryImpl, org.hibernate.query.criteria.internal.expression.BinaryArithmeticOperation, org.hibernate.query.criteria.internal.expression.CoalesceExpression, org.hibernate.query.criteria.internal.expression.ConcatExpression, org.hibernate.query.criteria.internal.expression.DelegatedExpressionImpl, org.hibernate.query.criteria.internal.expression.EntityTypeExpression
Imports
java.io.Serializable, java.math.BigDecimal, .BigInteger, java.util.Collection, javax.persistence.criteria.Expression, .Predicate, org.hibernate.query.criteria.internal.CriteriaBuilderImpl, .ExpressionImplementor, org.hibernate.query.criteria.internal.expression.function.CastFunction

Models an expression in the criteria query language.
Author
Steve Ebersole

Constructor Summary

AccessConstructor and Description
public
ExpressionImpl(CriteriaBuilderImpl criteriaBuilder, Class<T> javaType)

Method Summary

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

Implements javax.persistence.criteria.Expression.as.

Perform a typecast upon the expression, returning a new expression object.
public ExpressionImplementor<BigDecimal>
public ExpressionImplementor<BigInteger>
public ExpressionImplementor<Double>
public ExpressionImplementor<Float>
public ExpressionImplementor<Integer>
public ExpressionImplementor<Long>
public ExpressionImplementor<String>
public Predicate
in(Object...
values to be tested against
values
)

Implements javax.persistence.criteria.Expression.in.

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

Implements javax.persistence.criteria.Expression.in.

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

Implements javax.persistence.criteria.Expression.in.

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

Implements javax.persistence.criteria.Expression.in.

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

Implements javax.persistence.criteria.Expression.isNotNull.

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

Implements javax.persistence.criteria.Expression.isNull.

Create a predicate to test whether the expression is null.
Inherited from org.hibernate.query.criteria.internal.expression.SelectionImpl:
aliasgetCompoundSelectionItemsgetValueHandlersisCompoundSelection

Constructor Detail

ExpressionImplback to summary
public ExpressionImpl(CriteriaBuilderImpl criteriaBuilder, Class<T> javaType)

Method Detail

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

Implements javax.persistence.criteria.Expression.as.

Doc from javax.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:Expression<X>

new expression of the given type

Annotations
@Override
@SuppressWarnings:unchecked
asBigDecimalback to summary
public ExpressionImplementor<BigDecimal> asBigDecimal()

Implements org.hibernate.query.criteria.internal.ExpressionImplementor.asBigDecimal.

Doc from org.hibernate.query.criteria.internal.ExpressionImplementor.asBigDecimal.

See javax.persistence.criteria.CriteriaBuilder#toBigDecimal

Returns:ExpressionImplementor<BigDecimal>

this but as a BigDecimal

Annotations
@Override
@SuppressWarnings:unchecked
asBigIntegerback to summary
public ExpressionImplementor<BigInteger> asBigInteger()

Implements org.hibernate.query.criteria.internal.ExpressionImplementor.asBigInteger.

Doc from org.hibernate.query.criteria.internal.ExpressionImplementor.asBigInteger.

See javax.persistence.criteria.CriteriaBuilder#toBigInteger

Returns:ExpressionImplementor<BigInteger>

this but as a BigInteger

Annotations
@Override
@SuppressWarnings:unchecked
asDoubleback to summary
public ExpressionImplementor<Double> asDouble()

Implements org.hibernate.query.criteria.internal.ExpressionImplementor.asDouble.

Doc from org.hibernate.query.criteria.internal.ExpressionImplementor.asDouble.

See javax.persistence.criteria.CriteriaBuilder#toDouble

Returns:ExpressionImplementor<Double>

this but as a double

Annotations
@Override
@SuppressWarnings:unchecked
asFloatback to summary
public ExpressionImplementor<Float> asFloat()

Implements org.hibernate.query.criteria.internal.ExpressionImplementor.asFloat.

Doc from org.hibernate.query.criteria.internal.ExpressionImplementor.asFloat.

See javax.persistence.criteria.CriteriaBuilder#toFloat

Returns:ExpressionImplementor<Float>

this but as a float

Annotations
@Override
@SuppressWarnings:unchecked
asIntegerback to summary
public ExpressionImplementor<Integer> asInteger()

Implements org.hibernate.query.criteria.internal.ExpressionImplementor.asInteger.

Doc from org.hibernate.query.criteria.internal.ExpressionImplementor.asInteger.

See javax.persistence.criteria.CriteriaBuilder#toInteger

Returns:ExpressionImplementor<Integer>

this but as an integer

Annotations
@Override
@SuppressWarnings:unchecked
asLongback to summary
public ExpressionImplementor<Long> asLong()

Implements org.hibernate.query.criteria.internal.ExpressionImplementor.asLong.

Doc from org.hibernate.query.criteria.internal.ExpressionImplementor.asLong.

See javax.persistence.criteria.CriteriaBuilder#toLong

Returns:ExpressionImplementor<Long>

this but as a long

Annotations
@Override
@SuppressWarnings:unchecked
asStringback to summary
public ExpressionImplementor<String> asString()

Implements org.hibernate.query.criteria.internal.ExpressionImplementor.asString.

Doc from org.hibernate.query.criteria.internal.ExpressionImplementor.asString.

See javax.persistence.criteria.CriteriaBuilder#toString

Returns:ExpressionImplementor<String>

this but as a string

Annotations
@Override
@SuppressWarnings:unchecked
inback to summary
public Predicate in(Object... values)

Implements javax.persistence.criteria.Expression.in.

Doc from javax.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:Predicate

predicate testing for membership

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

Implements javax.persistence.criteria.Expression.in.

Doc from javax.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:Predicate

predicate testing for membership

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

Implements javax.persistence.criteria.Expression.in.

Doc from javax.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:Predicate

predicate testing for membership

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

Implements javax.persistence.criteria.Expression.in.

Doc from javax.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:Predicate

predicate testing for membership

Annotations
@Override
isNotNullback to summary
public Predicate isNotNull()

Implements javax.persistence.criteria.Expression.isNotNull.

Doc from javax.persistence.criteria.Expression.isNotNull.

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

Returns:Predicate

predicate testing whether the expression is not null

Annotations
@Override
isNullback to summary
public Predicate isNull()

Implements javax.persistence.criteria.Expression.isNull.

Doc from javax.persistence.criteria.Expression.isNull.

Create a predicate to test whether the expression is null.

Returns:Predicate

predicate testing whether the expression is null

Annotations
@Override