JPA Interface

Coalesce

Super Interfaces:
Expression<T>, Selection<T>, TupleElement<T>

Interface used to build coalesce expressions. A coalesce expression is equivalent to a case expression that returns null if all its arguments evaluate to null, and the value of its first non-null argument otherwise.
Since:
JPA 2.0

Public Methods

Expression<X> as(Class<X> type)
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 - intended type of the expression
Return:
new expression of the given type
Inherited from:
Expression<T>
Since:
JPA 2.0
Predicate in(Collection<?> values)
Create a predicate to test whether the expression is a member of the collection.
Parameters:
values - collection of values to be tested against
Return:
predicate testing for membership
Inherited from:
Expression<T>
Since:
JPA 2.0
Predicate in(Expression<?>... values)
Create a predicate to test whether the expression is a member of the argument list.
Parameters:
values - expressions to be tested against
Return:
predicate testing for membership
Inherited from:
Expression<T>
Since:
JPA 2.0
Predicate in(Expression<Collection<?>> values)
Create a predicate to test whether the expression is a member of the collection.
Parameters:
values - expression corresponding to collection to be tested against
Return:
predicate testing for membership
Inherited from:
Expression<T>
Since:
JPA 2.0
Predicate in(Object... values)
Create a predicate to test whether the expression is a member of the argument list.
Parameters:
values - values to be tested against
Return:
predicate testing for membership
Inherited from:
Expression<T>
Since:
JPA 2.0
Create a predicate to test whether the expression is not null.
Return:
predicate testing whether the expression is not null
Inherited from:
Expression<T>
Since:
JPA 2.0
Create a predicate to test whether the expression is null.
Return:
predicate testing whether the expression is null
Inherited from:
Expression<T>
Since:
JPA 2.0
CriteriaBuilder.Coalesce<T> value(Expression<?extendsT> value)
Add an argument to the coalesce expression.
Parameters:
value - expression
Return:
coalesce expression
Since:
JPA 2.0
CriteriaBuilder.Coalesce<T> value(T value)
Add an argument to the coalesce expression.
Parameters:
value - value
Return:
coalesce expression
Since:
JPA 2.0