public interface CriteriaBuilder
Note that Predicate
is used instead of Expression<Boolean>
in this API in order to work around the fact that Java
generics are not compatible with varags.
Modifier and Type | Interface and Description |
---|---|
static interface |
CriteriaBuilder.Case<R>
Interface used to build general case expressions.
|
static interface |
CriteriaBuilder.Coalesce<T>
Interface used to build coalesce expressions.
|
static interface |
CriteriaBuilder.In<T>
Interface used to build in predicates.
|
static interface |
CriteriaBuilder.SimpleCase<C,R>
Interface used to build simple case expressions.
|
static class |
CriteriaBuilder.Trimspec
Used to specify how strings are trimmed.
|
Modifier and Type | Method and Description |
---|---|
<N extends Number> |
abs(Expression<N> x)
Create an expression that returns the absolute value
of its argument.
|
<Y> Expression<Y> |
all(Subquery<Y> subquery)
Create an all expression over the subquery results.
|
Predicate |
and(Expression<Boolean> x,
Expression<Boolean> y)
Create a conjunction of the given boolean expressions.
|
Predicate |
and(Predicate... restrictions)
Create a conjunction of the given restriction predicates.
|
<Y> Expression<Y> |
any(Subquery<Y> subquery)
Create an any expression over the subquery results.
|
CompoundSelection<Object[]> |
array(Selection<?>... selections)
Create an array-valued selection item.
|
Order |
asc(Expression<?> x)
Create an ordering by the ascending value of the expression.
|
<N extends Number> |
avg(Expression<N> x)
Create an aggregate expression applying the avg operation.
|
<Y extends Comparable<? super Y>> |
between(Expression<? extends Y> v,
Expression<? extends Y> x,
Expression<? extends Y> y)
Create a predicate for testing whether the first argument is
between the second and third arguments in value.
|
<Y extends Comparable<? super Y>> |
between(Expression<? extends Y> v,
Y x,
Y y)
Create a predicate for testing whether the first argument is
between the second and third arguments in value.
|
<T> CriteriaBuilder.Coalesce<T> |
coalesce()
Create a coalesce expression.
|
<Y> Expression<Y> |
coalesce(Expression<? extends Y> x,
Expression<? extends Y> y)
Create an expression that returns null if all its arguments
evaluate to null, and the value of the first non-null argument
otherwise.
|
<Y> Expression<Y> |
coalesce(Expression<? extends Y> x,
Y y)
Create an expression that returns null if all its arguments
evaluate to null, and the value of the first non-null argument
otherwise.
|
Expression<String> |
concat(Expression<String> x,
Expression<String> y)
Create an expression for string concatenation.
|
Expression<String> |
concat(Expression<String> x,
String y)
Create an expression for string concatenation.
|
Expression<String> |
concat(String x,
Expression<String> y)
Create an expression for string concatenation.
|
Predicate |
conjunction()
Create a conjunction (with zero conjuncts).
|
<Y> CompoundSelection<Y> |
construct(Class<Y> resultClass,
Selection<?>... selections)
Create a selection item corresponding to a constructor.
|
Expression<Long> |
count(Expression<?> x)
Create an aggregate expression applying the count operation.
|
Expression<Long> |
countDistinct(Expression<?> x)
Create an aggregate expression applying the count distinct
operation.
|
<T> CriteriaDelete<T> |
createCriteriaDelete(Class<T> targetEntity)
Create a
CriteriaDelete query object to perform a bulk delete operation. |
<T> CriteriaUpdate<T> |
createCriteriaUpdate(Class<T> targetEntity)
Create a
CriteriaUpdate query object to perform a bulk update operation. |
CriteriaQuery<Object> |
createQuery()
Create a
CriteriaQuery object. |
<T> CriteriaQuery<T> |
createQuery(Class<T> resultClass)
Create a
CriteriaQuery object with the specified result
type. |
CriteriaQuery<Tuple> |
createTupleQuery()
Create a
CriteriaQuery object that returns a tuple of
objects as its result. |
Expression<Date> |
currentDate()
Create expression to return current date.
|
Expression<Time> |
currentTime()
Create expression to return current time.
|
Expression<Timestamp> |
currentTimestamp()
Create expression to return current timestamp.
|
Order |
desc(Expression<?> x)
Create an ordering by the descending value of the expression.
|
<N extends Number> |
diff(Expression<? extends N> x,
Expression<? extends N> y)
Create an expression that returns the difference
between its arguments.
|
<N extends Number> |
diff(Expression<? extends N> x,
N y)
Create an expression that returns the difference
between its arguments.
|
<N extends Number> |
diff(N x,
Expression<? extends N> y)
Create an expression that returns the difference
between its arguments.
|
Predicate |
disjunction()
Create a disjunction (with zero disjuncts).
|
Predicate |
equal(Expression<?> x,
Expression<?> y)
Create a predicate for testing the arguments for equality.
|
Predicate |
equal(Expression<?> x,
Object y)
Create a predicate for testing the arguments for equality.
|
Predicate |
exists(Subquery<?> subquery)
Create a predicate testing the existence of a subquery result.
|
<T> Expression<T> |
function(String name,
Class<T> type,
Expression<?>... args)
Create an expression for the execution of a database
function.
|
Predicate |
ge(Expression<? extends Number> x,
Expression<? extends Number> y)
Create a predicate for testing whether the first argument is
greater than or equal to the second.
|
Predicate |
ge(Expression<? extends Number> x,
Number y)
Create a predicate for testing whether the first argument is
greater than or equal to the second.
|
<Y extends Comparable<? super Y>> |
greaterThan(Expression<? extends Y> x,
Expression<? extends Y> y)
Create a predicate for testing whether the first argument is
greater than the second.
|
<Y extends Comparable<? super Y>> |
greaterThan(Expression<? extends Y> x,
Y y)
Create a predicate for testing whether the first argument is
greater than the second.
|
<Y extends Comparable<? super Y>> |
greaterThanOrEqualTo(Expression<? extends Y> x,
Expression<? extends Y> y)
Create a predicate for testing whether the first argument is
greater than or equal to the second.
|
<Y extends Comparable<? super Y>> |
greaterThanOrEqualTo(Expression<? extends Y> x,
Y y)
Create a predicate for testing whether the first argument is
greater than or equal to the second.
|
<X extends Comparable<? super X>> |
greatest(Expression<X> x)
Create an aggregate expression for finding the greatest of
the values (strings, dates, etc).
|
Predicate |
gt(Expression<? extends Number> x,
Expression<? extends Number> y)
Create a predicate for testing whether the first argument is
greater than the second.
|
Predicate |
gt(Expression<? extends Number> x,
Number y)
Create a predicate for testing whether the first argument is
greater than the second.
|
<T> CriteriaBuilder.In<T> |
in(Expression<? extends T> expression)
Create predicate to test whether given expression
is contained in a list of values.
|
<C extends Collection<?>> |
isEmpty(Expression<C> collection)
Create a predicate that tests whether a collection is empty.
|
Predicate |
isFalse(Expression<Boolean> x)
Create a predicate testing for a false value.
|
<E,C extends Collection<E>> |
isMember(E elem,
Expression<C> collection)
Create a predicate that tests whether an element is
a member of a collection.
|
<E,C extends Collection<E>> |
isMember(Expression<E> elem,
Expression<C> collection)
Create a predicate that tests whether an element is
a member of a collection.
|
<C extends Collection<?>> |
isNotEmpty(Expression<C> collection)
Create a predicate that tests whether a collection is
not empty.
|
<E,C extends Collection<E>> |
isNotMember(E elem,
Expression<C> collection)
Create a predicate that tests whether an element is
not a member of a collection.
|
<E,C extends Collection<E>> |
isNotMember(Expression<E> elem,
Expression<C> collection)
Create a predicate that tests whether an element is
not a member of a collection.
|
Predicate |
isNotNull(Expression<?> x)
Create a predicate to test whether the expression is not null.
|
Predicate |
isNull(Expression<?> x)
Create a predicate to test whether the expression is null.
|
Predicate |
isTrue(Expression<Boolean> x)
Create a predicate testing for a true value.
|
<K,M extends Map<K,?>> |
keys(M map)
Create an expression that returns the keys of a map.
|
Predicate |
le(Expression<? extends Number> x,
Expression<? extends Number> y)
Create a predicate for testing whether the first argument is
less than or equal to the second.
|
Predicate |
le(Expression<? extends Number> x,
Number y)
Create a predicate for testing whether the first argument is
less than or equal to the second.
|
<X extends Comparable<? super X>> |
least(Expression<X> x)
Create an aggregate expression for finding the least of
the values (strings, dates, etc).
|
Expression<Integer> |
length(Expression<String> x)
Create expression to return length of a string.
|
<Y extends Comparable<? super Y>> |
lessThan(Expression<? extends Y> x,
Expression<? extends Y> y)
Create a predicate for testing whether the first argument is
less than the second.
|
<Y extends Comparable<? super Y>> |
lessThan(Expression<? extends Y> x,
Y y)
Create a predicate for testing whether the first argument is
less than the second.
|
<Y extends Comparable<? super Y>> |
lessThanOrEqualTo(Expression<? extends Y> x,
Expression<? extends Y> y)
Create a predicate for testing whether the first argument is
less than or equal to the second.
|
<Y extends Comparable<? super Y>> |
lessThanOrEqualTo(Expression<? extends Y> x,
Y y)
Create a predicate for testing whether the first argument is
less than or equal to the second.
|
Predicate |
like(Expression<String> x,
Expression<String> pattern)
Create a predicate for testing whether the expression
satisfies the given pattern.
|
Predicate |
like(Expression<String> x,
Expression<String> pattern,
char escapeChar)
Create a predicate for testing whether the expression
satisfies the given pattern.
|
Predicate |
like(Expression<String> x,
Expression<String> pattern,
Expression<Character> escapeChar)
Create a predicate for testing whether the expression
satisfies the given pattern.
|
Predicate |
like(Expression<String> x,
String pattern)
Create a predicate for testing whether the expression
satisfies the given pattern.
|
Predicate |
like(Expression<String> x,
String pattern,
char escapeChar)
Create a predicate for testing whether the expression
satisfies the given pattern.
|
Predicate |
like(Expression<String> x,
String pattern,
Expression<Character> escapeChar)
Create a predicate for testing whether the expression
satisfies the given pattern.
|
<T> Expression<T> |
literal(T value)
Create an expression for a literal.
|
Expression<Integer> |
locate(Expression<String> x,
Expression<String> pattern)
Create expression to locate the position of one string
within another, returning position of first character
if found.
|
Expression<Integer> |
locate(Expression<String> x,
Expression<String> pattern,
Expression<Integer> from)
Create expression to locate the position of one string
within another, returning position of first character
if found.
|
Expression<Integer> |
locate(Expression<String> x,
String pattern)
Create expression to locate the position of one string
within another, returning position of first character
if found.
|
Expression<Integer> |
locate(Expression<String> x,
String pattern,
int from)
Create expression to locate the position of one string
within another, returning position of first character
if found.
|
Expression<String> |
lower(Expression<String> x)
Create expression for converting a string to lowercase.
|
Predicate |
lt(Expression<? extends Number> x,
Expression<? extends Number> y)
Create a predicate for testing whether the first argument is
less than the second.
|
Predicate |
lt(Expression<? extends Number> x,
Number y)
Create a predicate for testing whether the first argument is
less than the second.
|
<N extends Number> |
max(Expression<N> x)
Create an aggregate expression applying the numerical max
operation.
|
<N extends Number> |
min(Expression<N> x)
Create an aggregate expression applying the numerical min
operation.
|
Expression<Integer> |
mod(Expression<Integer> x,
Expression<Integer> y)
Create an expression that returns the modulus
of its arguments.
|
Expression<Integer> |
mod(Expression<Integer> x,
Integer y)
Create an expression that returns the modulus
of its arguments.
|
Expression<Integer> |
mod(Integer x,
Expression<Integer> y)
Create an expression that returns the modulus
of its arguments.
|
<N extends Number> |
neg(Expression<N> x)
Create an expression that returns the arithmetic negation
of its argument.
|
Predicate |
not(Expression<Boolean> restriction)
Create a negation of the given restriction.
|
Predicate |
notEqual(Expression<?> x,
Expression<?> y)
Create a predicate for testing the arguments for inequality.
|
Predicate |
notEqual(Expression<?> x,
Object y)
Create a predicate for testing the arguments for inequality.
|
Predicate |
notLike(Expression<String> x,
Expression<String> pattern)
Create a predicate for testing whether the expression
does not satisfy the given pattern.
|
Predicate |
notLike(Expression<String> x,
Expression<String> pattern,
char escapeChar)
Create a predicate for testing whether the expression
does not satisfy the given pattern.
|
Predicate |
notLike(Expression<String> x,
Expression<String> pattern,
Expression<Character> escapeChar)
Create a predicate for testing whether the expression
does not satisfy the given pattern.
|
Predicate |
notLike(Expression<String> x,
String pattern)
Create a predicate for testing whether the expression
does not satisfy the given pattern.
|
Predicate |
notLike(Expression<String> x,
String pattern,
char escapeChar)
Create a predicate for testing whether the expression
does not satisfy the given pattern.
|
Predicate |
notLike(Expression<String> x,
String pattern,
Expression<Character> escapeChar)
Create a predicate for testing whether the expression
does not satisfy the given pattern.
|
<Y> Expression<Y> |
nullif(Expression<Y> x,
Expression<?> y)
Create an expression that tests whether its argument are
equal, returning null if they are and the value of the
first expression if they are not.
|
<Y> Expression<Y> |
nullif(Expression<Y> x,
Y y)
Create an expression that tests whether its argument are
equal, returning null if they are and the value of the
first expression if they are not.
|
<T> Expression<T> |
nullLiteral(Class<T> resultClass)
Create an expression for a null literal with the given type.
|
Predicate |
or(Expression<Boolean> x,
Expression<Boolean> y)
Create a disjunction of the given boolean expressions.
|
Predicate |
or(Predicate... restrictions)
Create a disjunction of the given restriction predicates.
|
<T> ParameterExpression<T> |
parameter(Class<T> paramClass)
Create a parameter expression.
|
<T> ParameterExpression<T> |
parameter(Class<T> paramClass,
String name)
Create a parameter expression with the given name.
|
<N extends Number> |
prod(Expression<? extends N> x,
Expression<? extends N> y)
Create an expression that returns the product
of its arguments.
|
<N extends Number> |
prod(Expression<? extends N> x,
N y)
Create an expression that returns the product
of its arguments.
|
<N extends Number> |
prod(N x,
Expression<? extends N> y)
Create an expression that returns the product
of its arguments.
|
Expression<Number> |
quot(Expression<? extends Number> x,
Expression<? extends Number> y)
Create an expression that returns the quotient
of its arguments.
|
Expression<Number> |
quot(Expression<? extends Number> x,
Number y)
Create an expression that returns the quotient
of its arguments.
|
Expression<Number> |
quot(Number x,
Expression<? extends Number> y)
Create an expression that returns the quotient
of its arguments.
|
<R> CriteriaBuilder.Case<R> |
selectCase()
Create a general case expression.
|
<C,R> CriteriaBuilder.SimpleCase<C,R> |
selectCase(Expression<? extends C> expression)
Create a simple case expression.
|
<C extends Collection<?>> |
size(C collection)
Create an expression that tests the size of a collection.
|
<C extends Collection<?>> |
size(Expression<C> collection)
Create an expression that tests the size of a collection.
|
<Y> Expression<Y> |
some(Subquery<Y> subquery)
Create a some expression over the subquery results.
|
Expression<Double> |
sqrt(Expression<? extends Number> x)
Create an expression that returns the square root
of its argument.
|
Expression<String> |
substring(Expression<String> x,
Expression<Integer> from)
Create an expression for substring extraction.
|
Expression<String> |
substring(Expression<String> x,
Expression<Integer> from,
Expression<Integer> len)
Create an expression for substring extraction.
|
Expression<String> |
substring(Expression<String> x,
int from)
Create an expression for substring extraction.
|
Expression<String> |
substring(Expression<String> x,
int from,
int len)
Create an expression for substring extraction.
|
<N extends Number> |
sum(Expression<? extends N> x,
Expression<? extends N> y)
Create an expression that returns the sum
of its arguments.
|
<N extends Number> |
sum(Expression<? extends N> x,
N y)
Create an expression that returns the sum
of its arguments.
|
<N extends Number> |
sum(Expression<N> x)
Create an aggregate expression applying the sum operation.
|
<N extends Number> |
sum(N x,
Expression<? extends N> y)
Create an expression that returns the sum
of its arguments.
|
Expression<Double> |
sumAsDouble(Expression<Float> x)
Create an aggregate expression applying the sum operation to a
Float-valued expression, returning a Double result.
|
Expression<Long> |
sumAsLong(Expression<Integer> x)
Create an aggregate expression applying the sum operation to an
Integer-valued expression, returning a Long result.
|
Expression<BigDecimal> |
toBigDecimal(Expression<? extends Number> number)
Typecast.
|
Expression<BigInteger> |
toBigInteger(Expression<? extends Number> number)
Typecast.
|
Expression<Double> |
toDouble(Expression<? extends Number> number)
Typecast.
|
Expression<Float> |
toFloat(Expression<? extends Number> number)
Typecast.
|
Expression<Integer> |
toInteger(Expression<? extends Number> number)
Typecast.
|
Expression<Long> |
toLong(Expression<? extends Number> number)
Typecast.
|
Expression<String> |
toString(Expression<Character> character)
Typecast.
|
<X,T,E extends T> |
treat(CollectionJoin<X,T> join,
Class<E> type)
Downcast CollectionJoin object to the specified type.
|
<X,T,V extends T> |
treat(Join<X,T> join,
Class<V> type)
Downcast Join object to the specified type.
|
<X,T,E extends T> |
treat(ListJoin<X,T> join,
Class<E> type)
Downcast ListJoin object to the specified type.
|
<X,K,T,V extends T> |
treat(MapJoin<X,K,T> join,
Class<V> type)
Downcast MapJoin object to the specified type.
|
<X,T extends X> |
treat(Path<X> path,
Class<T> type)
Downcast Path object to the specified type.
|
<X,T extends X> |
treat(Root<X> root,
Class<T> type)
Downcast Root object to the specified type.
|
<X,T,E extends T> |
treat(SetJoin<X,T> join,
Class<E> type)
Downcast SetJoin object to the specified type.
|
Expression<String> |
trim(char t,
Expression<String> x)
Create expression to trim character from both ends of
a string.
|
Expression<String> |
trim(CriteriaBuilder.Trimspec ts,
char t,
Expression<String> x)
Create expression to trim character from a string.
|
Expression<String> |
trim(CriteriaBuilder.Trimspec ts,
Expression<Character> t,
Expression<String> x)
Create expression to trim character from a string.
|
Expression<String> |
trim(CriteriaBuilder.Trimspec ts,
Expression<String> x)
Create expression to trim blanks from a string.
|
Expression<String> |
trim(Expression<Character> t,
Expression<String> x)
Create expression to trim character from both ends of
a string.
|
Expression<String> |
trim(Expression<String> x)
Create expression to trim blanks from both ends of
a string.
|
CompoundSelection<Tuple> |
tuple(Selection<?>... selections)
Create a tuple-valued selection item.
|
Expression<String> |
upper(Expression<String> x)
Create expression for converting a string to uppercase.
|
<V,M extends Map<?,V>> |
values(M map)
Create an expression that returns the values of a map.
|
CriteriaQuery<Object> createQuery()
CriteriaQuery
object.<T> CriteriaQuery<T> createQuery(Class<T> resultClass)
CriteriaQuery
object with the specified result
type.resultClass
- type of the query resultCriteriaQuery<Tuple> createTupleQuery()
CriteriaQuery
object that returns a tuple of
objects as its result.<T> CriteriaUpdate<T> createCriteriaUpdate(Class<T> targetEntity)
CriteriaUpdate
query object to perform a bulk update operation.targetEntity
- target type for update operation<T> CriteriaDelete<T> createCriteriaDelete(Class<T> targetEntity)
CriteriaDelete
query object to perform a bulk delete operation.targetEntity
- target type for delete operation<Y> CompoundSelection<Y> construct(Class<Y> resultClass, Selection<?>... selections)
resultClass
- class whose instance is to be constructedselections
- arguments to the constructorIllegalArgumentException
- if an argument is a
tuple- or array-valued selection itemCompoundSelection<Tuple> tuple(Selection<?>... selections)
selections
- selection itemsIllegalArgumentException
- if an argument is a
tuple- or array-valued selection itemCompoundSelection<Object[]> array(Selection<?>... selections)
selections
- selection itemsIllegalArgumentException
- if an argument is a
tuple- or array-valued selection itemOrder asc(Expression<?> x)
x
- expression used to define the orderingOrder desc(Expression<?> x)
x
- expression used to define the ordering<N extends Number> Expression<Double> avg(Expression<N> x)
x
- expression representing input value to avg operation<N extends Number> Expression<N> sum(Expression<N> x)
x
- expression representing input value to sum operationExpression<Long> sumAsLong(Expression<Integer> x)
x
- expression representing input value to sum operationExpression<Double> sumAsDouble(Expression<Float> x)
x
- expression representing input value to sum operation<N extends Number> Expression<N> max(Expression<N> x)
x
- expression representing input value to max operation<N extends Number> Expression<N> min(Expression<N> x)
x
- expression representing input value to min operation<X extends Comparable<? super X>> Expression<X> greatest(Expression<X> x)
x
- expression representing input value to greatest
operation<X extends Comparable<? super X>> Expression<X> least(Expression<X> x)
x
- expression representing input value to least
operationExpression<Long> count(Expression<?> x)
x
- expression representing input value to count
operationExpression<Long> countDistinct(Expression<?> x)
x
- expression representing input value to
count distinct operationPredicate exists(Subquery<?> subquery)
subquery
- subquery whose result is to be tested<Y> Expression<Y> all(Subquery<Y> subquery)
subquery
- subquery<Y> Expression<Y> some(Subquery<Y> subquery)
any
expression.subquery
- subquery<Y> Expression<Y> any(Subquery<Y> subquery)
some
expression.subquery
- subqueryPredicate and(Expression<Boolean> x, Expression<Boolean> y)
x
- boolean expressiony
- boolean expressionPredicate and(Predicate... restrictions)
restrictions
- zero or more restriction predicatesPredicate or(Expression<Boolean> x, Expression<Boolean> y)
x
- boolean expressiony
- boolean expressionPredicate or(Predicate... restrictions)
restrictions
- zero or more restriction predicatesPredicate not(Expression<Boolean> restriction)
restriction
- restriction expressionPredicate conjunction()
Predicate disjunction()
Predicate isTrue(Expression<Boolean> x)
x
- expression to be testedPredicate isFalse(Expression<Boolean> x)
x
- expression to be testedPredicate isNull(Expression<?> x)
x
- expressionPredicate isNotNull(Expression<?> x)
x
- expressionPredicate equal(Expression<?> x, Expression<?> y)
x
- expressiony
- expressionPredicate equal(Expression<?> x, Object y)
x
- expressiony
- objectPredicate notEqual(Expression<?> x, Expression<?> y)
x
- expressiony
- expressionPredicate notEqual(Expression<?> x, Object y)
x
- expressiony
- object<Y extends Comparable<? super Y>> Predicate greaterThan(Expression<? extends Y> x, Expression<? extends Y> y)
x
- expressiony
- expression<Y extends Comparable<? super Y>> Predicate greaterThan(Expression<? extends Y> x, Y y)
x
- expressiony
- value<Y extends Comparable<? super Y>> Predicate greaterThanOrEqualTo(Expression<? extends Y> x, Expression<? extends Y> y)
x
- expressiony
- expression<Y extends Comparable<? super Y>> Predicate greaterThanOrEqualTo(Expression<? extends Y> x, Y y)
x
- expressiony
- value<Y extends Comparable<? super Y>> Predicate lessThan(Expression<? extends Y> x, Expression<? extends Y> y)
x
- expressiony
- expression<Y extends Comparable<? super Y>> Predicate lessThan(Expression<? extends Y> x, Y y)
x
- expressiony
- value<Y extends Comparable<? super Y>> Predicate lessThanOrEqualTo(Expression<? extends Y> x, Expression<? extends Y> y)
x
- expressiony
- expression<Y extends Comparable<? super Y>> Predicate lessThanOrEqualTo(Expression<? extends Y> x, Y y)
x
- expressiony
- value<Y extends Comparable<? super Y>> Predicate between(Expression<? extends Y> v, Expression<? extends Y> x, Expression<? extends Y> y)
v
- expressionx
- expressiony
- expression<Y extends Comparable<? super Y>> Predicate between(Expression<? extends Y> v, Y x, Y y)
v
- expressionx
- valuey
- valuePredicate gt(Expression<? extends Number> x, Expression<? extends Number> y)
x
- expressiony
- expressionPredicate gt(Expression<? extends Number> x, Number y)
x
- expressiony
- valuePredicate ge(Expression<? extends Number> x, Expression<? extends Number> y)
x
- expressiony
- expressionPredicate ge(Expression<? extends Number> x, Number y)
x
- expressiony
- valuePredicate lt(Expression<? extends Number> x, Expression<? extends Number> y)
x
- expressiony
- expressionPredicate lt(Expression<? extends Number> x, Number y)
x
- expressiony
- valuePredicate le(Expression<? extends Number> x, Expression<? extends Number> y)
x
- expressiony
- expressionPredicate le(Expression<? extends Number> x, Number y)
x
- expressiony
- value<N extends Number> Expression<N> neg(Expression<N> x)
x
- expression<N extends Number> Expression<N> abs(Expression<N> x)
x
- expression<N extends Number> Expression<N> sum(Expression<? extends N> x, Expression<? extends N> y)
x
- expressiony
- expression<N extends Number> Expression<N> sum(Expression<? extends N> x, N y)
x
- expressiony
- value<N extends Number> Expression<N> sum(N x, Expression<? extends N> y)
x
- valuey
- expression<N extends Number> Expression<N> prod(Expression<? extends N> x, Expression<? extends N> y)
x
- expressiony
- expression<N extends Number> Expression<N> prod(Expression<? extends N> x, N y)
x
- expressiony
- value<N extends Number> Expression<N> prod(N x, Expression<? extends N> y)
x
- valuey
- expression<N extends Number> Expression<N> diff(Expression<? extends N> x, Expression<? extends N> y)
x
- expressiony
- expression<N extends Number> Expression<N> diff(Expression<? extends N> x, N y)
x
- expressiony
- value<N extends Number> Expression<N> diff(N x, Expression<? extends N> y)
x
- valuey
- expressionExpression<Number> quot(Expression<? extends Number> x, Expression<? extends Number> y)
x
- expressiony
- expressionExpression<Number> quot(Expression<? extends Number> x, Number y)
x
- expressiony
- valueExpression<Number> quot(Number x, Expression<? extends Number> y)
x
- valuey
- expressionExpression<Integer> mod(Expression<Integer> x, Expression<Integer> y)
x
- expressiony
- expressionExpression<Integer> mod(Expression<Integer> x, Integer y)
x
- expressiony
- valueExpression<Integer> mod(Integer x, Expression<Integer> y)
x
- valuey
- expressionExpression<Double> sqrt(Expression<? extends Number> x)
x
- expressionExpression<Long> toLong(Expression<? extends Number> number)
number
- numeric expressionExpression<Integer> toInteger(Expression<? extends Number> number)
number
- numeric expressionExpression<Float> toFloat(Expression<? extends Number> number)
number
- numeric expressionExpression<Double> toDouble(Expression<? extends Number> number)
number
- numeric expressionExpression<BigDecimal> toBigDecimal(Expression<? extends Number> number)
number
- numeric expressionExpression<BigInteger> toBigInteger(Expression<? extends Number> number)
number
- numeric expressionExpression<String> toString(Expression<Character> character)
character
- expression<T> Expression<T> literal(T value)
value
- value represented by the expressionIllegalArgumentException
- if value is null<T> Expression<T> nullLiteral(Class<T> resultClass)
resultClass
- type of the null literal<T> ParameterExpression<T> parameter(Class<T> paramClass)
paramClass
- parameter class<T> ParameterExpression<T> parameter(Class<T> paramClass, String name)
paramClass
- parameter classname
- name that can be used to refer to
the parameter<C extends Collection<?>> Predicate isEmpty(Expression<C> collection)
collection
- expression<C extends Collection<?>> Predicate isNotEmpty(Expression<C> collection)
collection
- expression<C extends Collection<?>> Expression<Integer> size(Expression<C> collection)
collection
- expression<C extends Collection<?>> Expression<Integer> size(C collection)
collection
- collection<E,C extends Collection<E>> Predicate isMember(Expression<E> elem, Expression<C> collection)
elem
- element expressioncollection
- expression<E,C extends Collection<E>> Predicate isMember(E elem, Expression<C> collection)
elem
- elementcollection
- expression<E,C extends Collection<E>> Predicate isNotMember(Expression<E> elem, Expression<C> collection)
elem
- element expressioncollection
- expression<E,C extends Collection<E>> Predicate isNotMember(E elem, Expression<C> collection)
elem
- elementcollection
- expression<V,M extends Map<?,V>> Expression<Collection<V>> values(M map)
map
- map<K,M extends Map<K,?>> Expression<Set<K>> keys(M map)
map
- mapPredicate like(Expression<String> x, Expression<String> pattern)
x
- string expressionpattern
- string expressionPredicate like(Expression<String> x, String pattern)
x
- string expressionpattern
- stringPredicate like(Expression<String> x, Expression<String> pattern, Expression<Character> escapeChar)
x
- string expressionpattern
- string expressionescapeChar
- escape character expressionPredicate like(Expression<String> x, Expression<String> pattern, char escapeChar)
x
- string expressionpattern
- string expressionescapeChar
- escape characterPredicate like(Expression<String> x, String pattern, Expression<Character> escapeChar)
x
- string expressionpattern
- stringescapeChar
- escape character expressionPredicate like(Expression<String> x, String pattern, char escapeChar)
x
- string expressionpattern
- stringescapeChar
- escape characterPredicate notLike(Expression<String> x, Expression<String> pattern)
x
- string expressionpattern
- string expressionPredicate notLike(Expression<String> x, String pattern)
x
- string expressionpattern
- stringPredicate notLike(Expression<String> x, Expression<String> pattern, Expression<Character> escapeChar)
x
- string expressionpattern
- string expressionescapeChar
- escape character expressionPredicate notLike(Expression<String> x, Expression<String> pattern, char escapeChar)
x
- string expressionpattern
- string expressionescapeChar
- escape characterPredicate notLike(Expression<String> x, String pattern, Expression<Character> escapeChar)
x
- string expressionpattern
- stringescapeChar
- escape character expressionPredicate notLike(Expression<String> x, String pattern, char escapeChar)
x
- string expressionpattern
- stringescapeChar
- escape characterExpression<String> concat(Expression<String> x, Expression<String> y)
x
- string expressiony
- string expressionExpression<String> concat(Expression<String> x, String y)
x
- string expressiony
- stringExpression<String> concat(String x, Expression<String> y)
x
- stringy
- string expressionExpression<String> substring(Expression<String> x, Expression<Integer> from)
x
- string expressionfrom
- start position expressionExpression<String> substring(Expression<String> x, int from)
x
- string expressionfrom
- start positionExpression<String> substring(Expression<String> x, Expression<Integer> from, Expression<Integer> len)
x
- string expressionfrom
- start position expressionlen
- length expressionExpression<String> substring(Expression<String> x, int from, int len)
x
- string expressionfrom
- start positionlen
- lengthExpression<String> trim(Expression<String> x)
x
- expression for string to trimExpression<String> trim(CriteriaBuilder.Trimspec ts, Expression<String> x)
ts
- trim specificationx
- expression for string to trimExpression<String> trim(Expression<Character> t, Expression<String> x)
t
- expression for character to be trimmedx
- expression for string to trimExpression<String> trim(CriteriaBuilder.Trimspec ts, Expression<Character> t, Expression<String> x)
ts
- trim specificationt
- expression for character to be trimmedx
- expression for string to trimExpression<String> trim(char t, Expression<String> x)
t
- character to be trimmedx
- expression for string to trimExpression<String> trim(CriteriaBuilder.Trimspec ts, char t, Expression<String> x)
ts
- trim specificationt
- character to be trimmedx
- expression for string to trimExpression<String> lower(Expression<String> x)
x
- string expressionExpression<String> upper(Expression<String> x)
x
- string expressionExpression<Integer> length(Expression<String> x)
x
- string expressionExpression<Integer> locate(Expression<String> x, Expression<String> pattern)
x
- expression for string to be searchedpattern
- expression for string to be locatedExpression<Integer> locate(Expression<String> x, String pattern)
x
- expression for string to be searchedpattern
- string to be locatedExpression<Integer> locate(Expression<String> x, Expression<String> pattern, Expression<Integer> from)
x
- expression for string to be searchedpattern
- expression for string to be locatedfrom
- expression for position at which to start searchExpression<Integer> locate(Expression<String> x, String pattern, int from)
x
- expression for string to be searchedpattern
- string to be locatedfrom
- position at which to start searchExpression<Date> currentDate()
Expression<Timestamp> currentTimestamp()
Expression<Time> currentTime()
<T> CriteriaBuilder.In<T> in(Expression<? extends T> expression)
expression
- to be tested against list of values<Y> Expression<Y> coalesce(Expression<? extends Y> x, Expression<? extends Y> y)
x
- expressiony
- expression<Y> Expression<Y> coalesce(Expression<? extends Y> x, Y y)
x
- expressiony
- value<Y> Expression<Y> nullif(Expression<Y> x, Expression<?> y)
x
- expressiony
- expression<Y> Expression<Y> nullif(Expression<Y> x, Y y)
x
- expressiony
- value<T> CriteriaBuilder.Coalesce<T> coalesce()
<C,R> CriteriaBuilder.SimpleCase<C,R> selectCase(Expression<? extends C> expression)
expression
- to be tested against the case conditions<R> CriteriaBuilder.Case<R> selectCase()
<T> Expression<T> function(String name, Class<T> type, Expression<?>... args)
name
- function nametype
- expected result typeargs
- function arguments<X,T,V extends T> Join<X,V> treat(Join<X,T> join, Class<V> type)
join
- Join objecttype
- type to be downcast to<X,T,E extends T> CollectionJoin<X,E> treat(CollectionJoin<X,T> join, Class<E> type)
join
- CollectionJoin objecttype
- type to be downcast to<X,T,E extends T> SetJoin<X,E> treat(SetJoin<X,T> join, Class<E> type)
join
- SetJoin objecttype
- type to be downcast to<X,T,E extends T> ListJoin<X,E> treat(ListJoin<X,T> join, Class<E> type)
join
- ListJoin objecttype
- type to be downcast to<X,K,T,V extends T> MapJoin<X,K,V> treat(MapJoin<X,K,T> join, Class<V> type)
join
- MapJoin objecttype
- type to be downcast to<X,T extends X> Path<T> treat(Path<X> path, Class<T> type)
path
- pathtype
- type to be downcast toCopyright © 1996-2017, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.