in this API in order to work around the fact that Java
generics are not compatible with varags.
- Since:
- Java Persistence 2.0
|
Method Summary |
|
abs(Expression<N> x)
Create an expression that returns the absolute value of its argument. |
|
all(Subquery<Y> subquery)
Create a predicate corresponding to an all expression over the subquery
results. |
Predicate |
and(Expression<java.lang.Boolean> x,
Expression<java.lang.Boolean> y)
Create a conjunction of the given boolean expressions. |
Predicate |
and(Predicate... restrictions)
Create a conjunction of the given restriction predicates. |
|
any(Subquery<Y> subquery)
Create a predicate corresponding to an any expression over the subquery
results. |
Order |
asc(Expression<?> x)
Create an ordering by the ascending value of the expression. |
<N extends java.lang.Number>
Expression<java.lang.Double> |
|
avg(Expression<N> x)
Create an expression applying the avg operation. |
<Y extends java.lang.Comparable<Y>>
Predicate |
|
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 java.lang.Comparable<Y>>
Predicate |
|
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. |
|
coalesce()
Create a coalesce expression. |
|
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. |
|
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<java.lang.String> |
concat(Expression<java.lang.String> x,
Expression<java.lang.String> y)
String concatenation operation. |
Expression<java.lang.String> |
concat(Expression<java.lang.String> x,
java.lang.String y)
String concatenation operation. |
Expression<java.lang.String> |
concat(java.lang.String x,
Expression<java.lang.String> y)
String concatenation operation. |
Predicate |
conjunction()
Create a conjunction (with zero conjuncts). |
|
construct(java.lang.Class<Y> result,
Selection<?>... selections)
Define a select list item corresponding to a constructor. |
Expression<java.lang.Long> |
count(Expression<?> x)
Create an expression applying the count operation. |
Expression<java.lang.Long> |
countDistinct(Expression<?> x)
Create an expression applying the count distinct operation. |
CriteriaQuery<java.lang.Object> |
createQuery()
Create a Criteria query object. |
|
createQuery(java.lang.Class<T> resultClass)
Create a Criteria query object. |
CriteriaQuery<Tuple> |
createTupleQuery()
Create a Criteria query object that returns a tuple of
objects as its result. |
Expression<java.sql.Date> |
currentDate()
Create expression to return current date. |
Expression<java.sql.Time> |
currentTime()
Create expression to return current time. |
Expression<java.sql.Timestamp> |
currentTimestamp()
Create expression to return current timestamp. |
Order |
desc(Expression<?> x)
Create an ordering by the descending value of the expression. |
|
diff(Expression<? extends N> x,
Expression<? extends N> y)
Create an expression that returns the difference between its arguments. |
|
diff(Expression<? extends N> x,
N y)
Create an expression that returns the difference between its arguments. |
|
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,
java.lang.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. |
|
function(java.lang.String name,
java.lang.Class<T> type,
Expression<?>... args)
Create an expression for execution of a database function. |
Predicate |
ge(Expression<? extends java.lang.Number> x,
Expression<? extends java.lang.Number> y)
Create a predicate for testing whether the first argument is greater than
or equal to the second. |
Predicate |
ge(Expression<? extends java.lang.Number> x,
java.lang.Number y)
Create a predicate for testing whether the first argument is greater than
or equal to the second. |
<Y extends java.lang.Comparable<Y>>
Predicate |
|
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 java.lang.Comparable<Y>>
Predicate |
|
greaterThan(Expression<? extends Y> x,
Y y)
Create a predicate for testing whether the first argument is greater than
the second. |
<Y extends java.lang.Comparable<Y>>
Predicate |
|
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 java.lang.Comparable<Y>>
Predicate |
|
greaterThanOrEqualTo(Expression<? extends Y> x,
Y y)
Create a predicate for testing whether the first argument is greater than
or equal to the second. |
|
greatest(Expression<X> x)
Create an aggregate expression for finding the greatest of the values
(strings, dates, etc). |
Predicate |
gt(Expression<? extends java.lang.Number> x,
Expression<? extends java.lang.Number> y)
Create a predicate for testing whether the first argument is greater than
the second. |
Predicate |
gt(Expression<? extends java.lang.Number> x,
java.lang.Number y)
Create a predicate for testing whether the first argument is greater than
the second. |
|
in(Expression<? extends T> expression)
Create predicate to test whether given expression is contained in a list
of values. |
<C extends java.util.Collection<?>>
Predicate |
|
isEmpty(Expression<C> collection)
Create a predicate that tests whether a collection is empty. |
Predicate |
isFalse(Expression<java.lang.Boolean> x)
Create a predicate testing for a false value. |
<E,C extends java.util.Collection<E>>
Predicate |
|
isMember(E elem,
Expression<C> collection)
Create a predicate that tests whether an element is a member of a
collection. |
<E,C extends java.util.Collection<E>>
Predicate |
|
isMember(Expression<E> elem,
Expression<C> collection)
Create a predicate that tests whether an element is a member of a
collection. |
<C extends java.util.Collection<?>>
Predicate |
|
isNotEmpty(Expression<C> collection)
Create a predicate that tests whether a collection is not empty. |
<E,C extends java.util.Collection<E>>
Predicate |
|
isNotMember(E elem,
Expression<C> collection)
Create a predicate that tests whether an element is not a member of a
collection. |
<E,C extends java.util.Collection<E>>
Predicate |
|
isNotMember(Expression<E> elem,
Expression<C> collection)
Create a predicate that tests whether an element is not a member of a
collection. |
Predicate |
isTrue(Expression<java.lang.Boolean> x)
Create a predicate testing for a true value. |
<K,M extends java.util.Map<K,?>>
Expression<java.util.Set<K>> |
|
keys(M map)
Create an expression that returns the keys of a map. |
Predicate |
le(Expression<? extends java.lang.Number> x,
Expression<? extends java.lang.Number> y)
Create a predicate for testing whether the first argument is less than or
equal to the second. |
Predicate |
le(Expression<? extends java.lang.Number> x,
java.lang.Number y)
Create a predicate for testing whether the first argument is less than or
equal to the second. |
|
least(Expression<X> x)
Create an aggregate expression for finding the least of the values
(strings, dates, etc). |
Expression<java.lang.Integer> |
length(Expression<java.lang.String> x)
Create expression to return length of a string. |
<Y extends java.lang.Comparable<Y>>
Predicate |
|
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 java.lang.Comparable<Y>>
Predicate |
|
lessThan(Expression<? extends Y> x,
Y y)
Create a predicate for testing whether the first argument is less than
the second. |
<Y extends java.lang.Comparable<Y>>
Predicate |
|
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 java.lang.Comparable<Y>>
Predicate |
|
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<java.lang.String> x,
Expression<java.lang.String> pattern)
Create a predicate for testing whether the expression satisfies the given
pattern. |
Predicate |
like(Expression<java.lang.String> x,
Expression<java.lang.String> pattern,
char escapeChar)
Create a predicate for testing whether the expression satisfies the given
pattern. |
Predicate |
like(Expression<java.lang.String> x,
Expression<java.lang.String> pattern,
Expression<java.lang.Character> escapeChar)
Create a predicate for testing whether the expression satisfies the given
pattern. |
Predicate |
like(Expression<java.lang.String> x,
java.lang.String pattern)
Create a predicate for testing whether the expression satisfies the given
pattern. |
Predicate |
like(Expression<java.lang.String> x,
java.lang.String pattern,
char escapeChar)
Create a predicate for testing whether the expression satisfies the given
pattern. |
Predicate |
like(Expression<java.lang.String> x,
java.lang.String pattern,
Expression<java.lang.Character> escapeChar)
Create a predicate for testing whether the expression satisfies the given
pattern. |
|
literal(T value)
Create an expression literal. |
Expression<java.lang.Integer> |
locate(Expression<java.lang.String> x,
Expression<java.lang.String> pattern)
Create expression to locate the position of one string within another,
returning position of first character if found. |
Expression<java.lang.Integer> |
locate(Expression<java.lang.String> x,
Expression<java.lang.String> pattern,
Expression<java.lang.Integer> from)
Create expression to locate the position of one string within another,
returning position of first character if found. |
Expression<java.lang.Integer> |
locate(Expression<java.lang.String> x,
java.lang.String pattern)
Create expression to locate the position of one string within another,
returning position of first character if found. |
Expression<java.lang.Integer> |
locate(Expression<java.lang.String> x,
java.lang.String pattern,
int from)
Create expression to locate the position of one string within another,
returning position of first character if found. |
Expression<java.lang.String> |
lower(Expression<java.lang.String> x)
Create expression for converting a string to lowercase. |
Predicate |
lt(Expression<? extends java.lang.Number> x,
Expression<? extends java.lang.Number> y)
Create a predicate for testing whether the first argument is less than
the second. |
Predicate |
lt(Expression<? extends java.lang.Number> x,
java.lang.Number y)
Create a predicate for testing whether the first argument is less than
the second. |
|
max(Expression<N> x)
Create an expression applying the numerical max operation. |
|
min(Expression<N> x)
Create an expression applying the numerical min operation. |
Expression<java.lang.Integer> |
mod(Expression<java.lang.Integer> x,
Expression<java.lang.Integer> y)
Create an expression that returns the modulus of its arguments. |
Expression<java.lang.Integer> |
mod(Expression<java.lang.Integer> x,
java.lang.Integer y)
Create an expression that returns the modulus of its arguments. |
Expression<java.lang.Integer> |
mod(java.lang.Integer x,
Expression<java.lang.Integer> y)
Create an expression that returns the modulus of its arguments. |
|
neg(Expression<N> x)
Create an expression that returns the arithmetic negation of its
argument. |
Predicate |
not(Expression<java.lang.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,
java.lang.Object y)
Create a predicate for testing the arguments for inequality. |
Predicate |
notLike(Expression<java.lang.String> x,
Expression<java.lang.String> pattern)
Create a predicate for testing whether the expression does not satisfy
the given pattern. |
Predicate |
notLike(Expression<java.lang.String> x,
Expression<java.lang.String> pattern,
char escapeChar)
Create a predicate for testing whether the expression does not satisfy
the given pattern. |
Predicate |
notLike(Expression<java.lang.String> x,
Expression<java.lang.String> pattern,
Expression<java.lang.Character> escapeChar)
Create a predicate for testing whether the expression does not satisfy
the given pattern. |
Predicate |
notLike(Expression<java.lang.String> x,
java.lang.String pattern)
Create a predicate for testing whether the expression does not satisfy
the given pattern. |
Predicate |
notLike(Expression<java.lang.String> x,
java.lang.String pattern,
char escapeChar)
Create a predicate for testing whether the expression does not satisfy
the given pattern. |
Predicate |
notLike(Expression<java.lang.String> x,
java.lang.String pattern,
Expression<java.lang.Character> escapeChar)
Create a predicate for testing whether the expression does not satisfy
the given pattern. |
|
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. |
|
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. |
Predicate |
or(Expression<java.lang.Boolean> x,
Expression<java.lang.Boolean> y)
Create a disjunction of the given boolean expressions. |
Predicate |
or(Predicate... restrictions)
Create a disjunction of the given restriction predicates. |
|
parameter(java.lang.Class<T> paramClass)
Create a parameter. |
|
parameter(java.lang.Class<T> paramClass,
java.lang.String name)
Create a parameter expression with the given name. |
|
prod(Expression<? extends N> x,
Expression<? extends N> y)
Create an expression that returns the product of its arguments. |
|
prod(Expression<? extends N> x,
N y)
Create an expression that returns the product of its arguments. |
|
prod(N x,
Expression<? extends N> y)
Create an expression that returns the product of its arguments. |
Expression<java.lang.Number> |
quot(Expression<? extends java.lang.Number> x,
Expression<? extends java.lang.Number> y)
Create an expression that returns the quotient of its arguments. |
Expression<java.lang.Number> |
quot(Expression<? extends java.lang.Number> x,
java.lang.Number y)
Create an expression that returns the quotient of its arguments. |
Expression<java.lang.Number> |
quot(java.lang.Number x,
Expression<? extends java.lang.Number> y)
Create an expression that returns the quotient of its arguments. |
|
selectCase()
Create a general case expression. |
|
selectCase(Expression<? extends C> expression)
Create simple case expression. |
<C extends java.util.Collection<?>>
Expression<java.lang.Integer> |
|
size(C collection)
Create an expression that tests the size of a collection. |
<C extends java.util.Collection<?>>
Expression<java.lang.Integer> |
|
size(Expression<C> collection)
Create an expression that tests the size of a collection. |
|
some(Subquery<Y> subquery)
Create a predicate corresponding to a some expression over the subquery
results. |
Expression<java.lang.Double> |
sqrt(Expression<? extends java.lang.Number> x)
Create an expression that returns the square root of its argument. |
Expression<java.lang.String> |
substring(Expression<java.lang.String> x,
Expression<java.lang.Integer> from)
Substring extraction operation. |
Expression<java.lang.String> |
substring(Expression<java.lang.String> x,
Expression<java.lang.Integer> from,
Expression<java.lang.Integer> len)
Substring extraction operation. |
Expression<java.lang.String> |
substring(Expression<java.lang.String> x,
int from)
Substring extraction operation. |
Expression<java.lang.String> |
substring(Expression<java.lang.String> x,
int from,
int len)
Substring extraction operation. |
|
sum(Expression<? extends N> x,
Expression<? extends N> y)
Create an expression that returns the sum of its arguments. |
|
sum(Expression<? extends N> x,
N y)
Create an expression that returns the sum of its arguments. |
|
sum(Expression<N> x)
Create an expression applying the sum operation. |
|
sum(N x,
Expression<? extends N> y)
Create an expression that returns the sum of its arguments. |
Expression<java.math.BigDecimal> |
toBigDecimal(Expression<? extends java.lang.Number> number)
Typecast. |
Expression<java.math.BigInteger> |
toBigInteger(Expression<? extends java.lang.Number> number)
Typecast. |
Expression<java.lang.Double> |
toDouble(Expression<? extends java.lang.Number> number)
Typecast. |
Expression<java.lang.Float> |
toFloat(Expression<? extends java.lang.Number> number)
Typecast. |
Expression<java.lang.Integer> |
toInteger(Expression<? extends java.lang.Number> number)
Typecast. |
Expression<java.lang.Long> |
toLong(Expression<? extends java.lang.Number> number)
Typecast. |
Expression<java.lang.String> |
toString(Expression<java.lang.Character> character)
Typecast. |
Expression<java.lang.String> |
trim(char t,
Expression<java.lang.String> x)
Create expression to trim character from both ends of a string. |
Expression<java.lang.String> |
trim(Expression<java.lang.Character> t,
Expression<java.lang.String> x)
Create expression to trim character from both ends of a string. |
Expression<java.lang.String> |
trim(Expression<java.lang.String> x)
Create expression to trim blanks from both ends of a string. |
Expression<java.lang.String> |
trim(QueryBuilder.Trimspec ts,
char t,
Expression<java.lang.String> x)
Create expression to trim character from a string. |
Expression<java.lang.String> |
trim(QueryBuilder.Trimspec ts,
Expression<java.lang.Character> t,
Expression<java.lang.String> x)
Create expression to trim character from a string. |
Expression<java.lang.String> |
trim(QueryBuilder.Trimspec ts,
Expression<java.lang.String> x)
Create expression to trim blanks from a string. |
Expression<java.lang.String> |
upper(Expression<java.lang.String> x)
Create expression for converting a string to uppercase. |
<V,M extends java.util.Map<?,V>>
Expression<java.util.Collection<V>> |
|
values(M map)
Create an expression that returns the values of a map. |
createQuery
CriteriaQuery<java.lang.Object> createQuery()
- Create a Criteria query object.
- Returns:
- query object
createQuery
<T> CriteriaQuery<T> createQuery(java.lang.Class<T> resultClass)
- Create a Criteria query object.
- Returns:
- query object
createTupleQuery
CriteriaQuery<Tuple> createTupleQuery()
- Create a Criteria query object that returns a tuple of
objects as its result.
- Returns:
- query object
construct
<Y> Selection<Y> construct(java.lang.Class<Y> result,
Selection<?>... selections)
- Define a select list item corresponding to a constructor.
- Parameters:
result - class whose instance is to be constructedselections - arguments to the constructor
- Returns:
- selection item
asc
Order asc(Expression<?> x)
- Create an ordering by the ascending value of the expression.
- Parameters:
x - expression used to define the ordering
- Returns:
- ascending ordering corresponding to the expression
desc
Order desc(Expression<?> x)
- Create an ordering by the descending value of the expression.
- Parameters:
x - expression used to define the ordering
- Returns:
- descending ordering corresponding to the expression
avg
<N extends java.lang.Number> Expression<java.lang.Double> avg(Expression<N> x)
- Create an expression applying the avg operation.
- Parameters:
x - expression representing input value to avg operation
- Returns:
- avg expression
sum
<N extends java.lang.Number> Expression<N> sum(Expression<N> x)
- Create an expression applying the sum operation.
- Parameters:
x - expression representing input value to sum operation
- Returns:
- sum expression
max
<N extends java.lang.Number> Expression<N> max(Expression<N> x)
- Create an expression applying the numerical max operation.
- Parameters:
x - expression representing input value to max operation
- Returns:
- max expression
min
<N extends java.lang.Number> Expression<N> min(Expression<N> x)
- Create an expression applying the numerical min operation.
- Parameters:
x - expression representing input value to min operation
- Returns:
- min expression
greatest
<X extends java.lang.Comparable<X>> Expression<X> greatest(Expression<X> x)
- Create an aggregate expression for finding the greatest of the values
(strings, dates, etc).
- Parameters:
x - expression representing input value to greatest operation
- Returns:
- greatest expression
least
<X extends java.lang.Comparable<X>> Expression<X> least(Expression<X> x)
- Create an aggregate expression for finding the least of the values
(strings, dates, etc).
- Parameters:
x - expression representing input value to least operation
- Returns:
- least expression
count
Expression<java.lang.Long> count(Expression<?> x)
- Create an expression applying the count operation.
- Parameters:
x - expression representing input value to count operation
- Returns:
- count expression
countDistinct
Expression<java.lang.Long> countDistinct(Expression<?> x)
- Create an expression applying the count distinct operation.
- Parameters:
x - expression representing input value to count distinct
operation
- Returns:
- count distinct expression
exists
Predicate exists(Subquery<?> subquery)
- Create a predicate testing the existence of a subquery result.
- Parameters:
subquery - subquery whose result is to be tested
- Returns:
- exists predicate
all
<Y> Expression<Y> all(Subquery<Y> subquery)
- Create a predicate corresponding to an all expression over the subquery
results.
- Parameters:
subquery -
- Returns:
- all expression
some
<Y> Expression<Y> some(Subquery<Y> subquery)
- Create a predicate corresponding to a some expression over the subquery
results. This is equivalent to an any expression.
- Parameters:
subquery -
- Returns:
- all expression
any
<Y> Expression<Y> any(Subquery<Y> subquery)
- Create a predicate corresponding to an any expression over the subquery
results. This is equivalent to a some expression.
- Parameters:
subquery -
- Returns:
- any expression
and
Predicate and(Expression<java.lang.Boolean> x,
Expression<java.lang.Boolean> y)
- Create a conjunction of the given boolean expressions.
- Parameters:
x - boolean expressiony - boolean expression
- Returns:
- and predicate
or
Predicate or(Expression<java.lang.Boolean> x,
Expression<java.lang.Boolean> y)
- Create a disjunction of the given boolean expressions.
- Parameters:
x - boolean expressiony - boolean expression
- Returns:
- or predicate
and
Predicate and(Predicate... restrictions)
- Create a conjunction of the given restriction predicates. A conjunction
of zero predicates is true.
- Parameters:
restriction - zero or more restriction predicates
- Returns:
- and predicate
or
Predicate or(Predicate... restrictions)
- Create a disjunction of the given restriction predicates. A disjunction
of zero predicates is false.
- Parameters:
restriction - zero or more restriction predicates
- Returns:
- and predicate
not
Predicate not(Expression<java.lang.Boolean> restriction)
- Create a negation of the given restriction.
- Parameters:
restriction - restriction expression
- Returns:
- not predicate
conjunction
Predicate conjunction()
- Create a conjunction (with zero conjuncts). A conjunction with zero
conjuncts is true.
- Returns:
- and predicate
disjunction
Predicate disjunction()
- Create a disjunction (with zero disjuncts). A disjunction with zero
disjuncts is false.
- Returns:
- or predicate
isTrue
Predicate isTrue(Expression<java.lang.Boolean> x)
- Create a predicate testing for a true value.
- Parameters:
x - expression to be tested if true
- Returns:
- predicate
isFalse
Predicate isFalse(Expression<java.lang.Boolean> x)
- Create a predicate testing for a false value.
- Parameters:
x - expression to be tested if false
- Returns:
- predicate
equal
Predicate equal(Expression<?> x,
Expression<?> y)
- Create a predicate for testing the arguments for equality.
- Parameters:
x - expressiony - expression
- Returns:
- equality predicate
notEqual
Predicate notEqual(Expression<?> x,
Expression<?> y)
- Create a predicate for testing the arguments for inequality.
- Parameters:
x - expressiony - expression
- Returns:
- inequality predicate
equal
Predicate equal(Expression<?> x,
java.lang.Object y)
- Create a predicate for testing the arguments for equality.
- Parameters:
x - expressiony - object
- Returns:
- equality predicate
notEqual
Predicate notEqual(Expression<?> x,
java.lang.Object y)
- Create a predicate for testing the arguments for inequality.
- Parameters:
x - expressiony - object
- Returns:
- inequality predicate
greaterThan
<Y extends java.lang.Comparable<Y>> Predicate greaterThan(Expression<? extends Y> x,
Expression<? extends Y> y)
- Create a predicate for testing whether the first argument is greater than
the second.
- Parameters:
x - expressiony - expression
- Returns:
- greater-than predicate
lessThan
<Y extends java.lang.Comparable<Y>> Predicate lessThan(Expression<? extends Y> x,
Expression<? extends Y> y)
- Create a predicate for testing whether the first argument is less than
the second.
- Parameters:
x - expressiony - expression
- Returns:
- less-than predicate
greaterThanOrEqualTo
<Y extends java.lang.Comparable<Y>> Predicate 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.
- Parameters:
x - expressiony - expression
- Returns:
- greater-than-or-equal predicate
lessThanOrEqualTo
<Y extends java.lang.Comparable<Y>> Predicate 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.
- Parameters:
x - expressiony - expression
- Returns:
- less-than-or-equal predicate
between
<Y extends java.lang.Comparable<Y>> Predicate 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.
- Parameters:
v - expressionx - expressiony - expression
- Returns:
- between predicate
greaterThan
<Y extends java.lang.Comparable<Y>> Predicate greaterThan(Expression<? extends Y> x,
Y y)
- Create a predicate for testing whether the first argument is greater than
the second.
- Parameters:
x - expressiony - value
- Returns:
- greater-than predicate
lessThan
<Y extends java.lang.Comparable<Y>> Predicate lessThan(Expression<? extends Y> x,
Y y)
- Create a predicate for testing whether the first argument is less than
the second.
- Parameters:
x - expressiony - value
- Returns:
- less-than predicate
greaterThanOrEqualTo
<Y extends java.lang.Comparable<Y>> Predicate greaterThanOrEqualTo(Expression<? extends Y> x,
Y y)
- Create a predicate for testing whether the first argument is greater than
or equal to the second.
- Parameters:
x - expressiony - value
- Returns:
- greater-than-or-equal predicate
lessThanOrEqualTo
<Y extends java.lang.Comparable<Y>> Predicate lessThanOrEqualTo(Expression<? extends Y> x,
Y y)
- Create a predicate for testing whether the first argument is less than or
equal to the second.
- Parameters:
x - expressiony - value
- Returns:
- less-than-or-equal predicate
between
<Y extends java.lang.Comparable<Y>> Predicate 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.
- Parameters:
v - expressionx - valuey - value
- Returns:
- between predicate
gt
Predicate gt(Expression<? extends java.lang.Number> x,
Expression<? extends java.lang.Number> y)
- Create a predicate for testing whether the first argument is greater than
the second.
- Parameters:
x - expressiony - expression
- Returns:
- greater-than predicate
lt
Predicate lt(Expression<? extends java.lang.Number> x,
Expression<? extends java.lang.Number> y)
- Create a predicate for testing whether the first argument is less than
the second.
- Parameters:
x - expressiony - expression
- Returns:
- less-than predicate
ge
Predicate ge(Expression<? extends java.lang.Number> x,
Expression<? extends java.lang.Number> y)
- Create a predicate for testing whether the first argument is greater than
or equal to the second.
- Parameters:
x - expressiony - expression
- Returns:
- greater-than-or-equal predicate
le
Predicate le(Expression<? extends java.lang.Number> x,
Expression<? extends java.lang.Number> y)
- Create a predicate for testing whether the first argument is less than or
equal to the second.
- Parameters:
x - expressiony - expression
- Returns:
- less-than-or-equal predicate
gt
Predicate gt(Expression<? extends java.lang.Number> x,
java.lang.Number y)
- Create a predicate for testing whether the first argument is greater than
the second.
- Parameters:
x - expressiony - value
- Returns:
- greater-than predicate
lt
Predicate lt(Expression<? extends java.lang.Number> x,
java.lang.Number y)
- Create a predicate for testing whether the first argument is less than
the second.
- Parameters:
x - expressiony - value
- Returns:
- less-than predicate
ge
Predicate ge(Expression<? extends java.lang.Number> x,
java.lang.Number y)
- Create a predicate for testing whether the first argument is greater than
or equal to the second.
- Parameters:
x - expressiony - value
- Returns:
- greater-than-or-equal predicate
le
Predicate le(Expression<? extends java.lang.Number> x,
java.lang.Number y)
- Create a predicate for testing whether the first argument is less than or
equal to the second.
- Parameters:
x - expressiony - value
- Returns:
- less-than-or-equal predicate
neg
<N extends java.lang.Number> Expression<N> neg(Expression<N> x)
- Create an expression that returns the arithmetic negation of its
argument.
- Parameters:
x - expression
- Returns:
- negated expression
abs
<N extends java.lang.Number> Expression<N> abs(Expression<N> x)
- Create an expression that returns the absolute value of its argument.
- Parameters:
x - expression
- Returns:
- absolute value
sum
<N extends java.lang.Number> Expression<N> sum(Expression<? extends N> x,
Expression<? extends N> y)
- Create an expression that returns the sum of its arguments.
- Parameters:
x - expressiony - expression
- Returns:
- sum
prod
<N extends java.lang.Number> Expression<N> prod(Expression<? extends N> x,
Expression<? extends N> y)
- Create an expression that returns the product of its arguments.
- Parameters:
x - expressiony - expression
- Returns:
- product
diff
<N extends java.lang.Number> Expression<N> diff(Expression<? extends N> x,
Expression<? extends N> y)
- Create an expression that returns the difference between its arguments.
- Parameters:
x - expressiony - expression
- Returns:
- difference
sum
<N extends java.lang.Number> Expression<N> sum(Expression<? extends N> x,
N y)
- Create an expression that returns the sum of its arguments.
- Parameters:
x - expressiony - value
- Returns:
- sum
prod
<N extends java.lang.Number> Expression<N> prod(Expression<? extends N> x,
N y)
- Create an expression that returns the product of its arguments.
- Parameters:
x - expressiony - value
- Returns:
- product
diff
<N extends java.lang.Number> Expression<N> diff(Expression<? extends N> x,
N y)
- Create an expression that returns the difference between its arguments.
- Parameters:
x - expressiony - value
- Returns:
- difference
sum
<N extends java.lang.Number> Expression<N> sum(N x,
Expression<? extends N> y)
- Create an expression that returns the sum of its arguments.
- Parameters:
x - valuey - expression
- Returns:
- sum
prod
<N extends java.lang.Number> Expression<N> prod(N x,
Expression<? extends N> y)
- Create an expression that returns the product of its arguments.
- Parameters:
x - valuey - expression
- Returns:
- product
diff
<N extends java.lang.Number> Expression<N> diff(N x,
Expression<? extends N> y)
- Create an expression that returns the difference between its arguments.
- Parameters:
x - valuey - expression
- Returns:
- difference
quot
Expression<java.lang.Number> quot(Expression<? extends java.lang.Number> x,
Expression<? extends java.lang.Number> y)
- Create an expression that returns the quotient of its arguments.
- Parameters:
x - expressiony - expression
- Returns:
- quotient
quot
Expression<java.lang.Number> quot(Expression<? extends java.lang.Number> x,
java.lang.Number y)
- Create an expression that returns the quotient of its arguments.
- Parameters:
x - expressiony - value
- Returns:
- quotient
quot
Expression<java.lang.Number> quot(java.lang.Number x,
Expression<? extends java.lang.Number> y)
- Create an expression that returns the quotient of its arguments.
- Parameters:
x - valuey - expression
- Returns:
- quotient
mod
Expression<java.lang.Integer> mod(Expression<java.lang.Integer> x,
Expression<java.lang.Integer> y)
- Create an expression that returns the modulus of its arguments.
- Parameters:
x - expressiony - expression
- Returns:
- modulus
mod
Expression<java.lang.Integer> mod(Expression<java.lang.Integer> x,
java.lang.Integer y)
- Create an expression that returns the modulus of its arguments.
- Parameters:
x - expressiony - value
- Returns:
- modulus
mod
Expression<java.lang.Integer> mod(java.lang.Integer x,
Expression<java.lang.Integer> y)
- Create an expression that returns the modulus of its arguments.
- Parameters:
x - valuey - expression
- Returns:
- modulus
sqrt
Expression<java.lang.Double> sqrt(Expression<? extends java.lang.Number> x)
- Create an expression that returns the square root of its argument.
- Parameters:
x - expression
- Returns:
- modulus
toLong
Expression<java.lang.Long> toLong(Expression<? extends java.lang.Number> number)
- Typecast.
- Parameters:
number - numeric expression
- Returns:
- Expression
toInteger
Expression<java.lang.Integer> toInteger(Expression<? extends java.lang.Number> number)
- Typecast.
- Parameters:
number - numeric expression
- Returns:
- Expression
toFloat
Expression<java.lang.Float> toFloat(Expression<? extends java.lang.Number> number)
- Typecast.
- Parameters:
number - numeric expression
- Returns:
- Expression
toDouble
Expression<java.lang.Double> toDouble(Expression<? extends java.lang.Number> number)
- Typecast.
- Parameters:
number - numeric expression
- Returns:
- Expression
toBigDecimal
Expression<java.math.BigDecimal> toBigDecimal(Expression<? extends java.lang.Number> number)
- Typecast.
- Parameters:
number - numeric expression
- Returns:
- Expression
toBigInteger
Expression<java.math.BigInteger> toBigInteger(Expression<? extends java.lang.Number> number)
- Typecast.
- Parameters:
number - numeric expression
- Returns:
- Expression
toString
Expression<java.lang.String> toString(Expression<java.lang.Character> character)
- Typecast.
- Parameters:
character - expression
- Returns:
- Expression
literal
<T> Expression<T> literal(T value)
- Create an expression literal.
- Parameters:
value -
- Returns:
- expression literal
parameter
<T> ParameterExpression<T> parameter(java.lang.Class<T> paramClass)
- Create a parameter.
Create a parameter expression.
- Parameters:
paramClass - parameter class
- Returns:
- parameter expression
parameter
<T> ParameterExpression<T> parameter(java.lang.Class<T> paramClass,
java.lang.String name)
- Create a parameter expression with the given name.
- Parameters:
paramClass - parameter classname -
- Returns:
- parameter
isEmpty
<C extends java.util.Collection<?>> Predicate isEmpty(Expression<C> collection)
- Create a predicate that tests whether a collection is empty.
- Parameters:
collection - expression
- Returns:
- predicate
isNotEmpty
<C extends java.util.Collection<?>> Predicate isNotEmpty(Expression<C> collection)
- Create a predicate that tests whether a collection is not empty.
- Parameters:
collection - expression
- Returns:
- predicate
size
<C extends java.util.Collection<?>> Expression<java.lang.Integer> size(C collection)
- Create an expression that tests the size of a collection.
- Parameters:
collection -
- Returns:
- size expression
size
<C extends java.util.Collection<?>> Expression<java.lang.Integer> size(Expression<C> collection)
- Create an expression that tests the size of a collection.
- Parameters:
collection - expression
- Returns:
- size expression
isMember
<E,C extends java.util.Collection<E>> Predicate isMember(E elem,
Expression<C> collection)
- Create a predicate that tests whether an element is a member of a
collection.
- Parameters:
elem - elementcollection - expression
- Returns:
- predicate
isNotMember
<E,C extends java.util.Collection<E>> Predicate isNotMember(E elem,
Expression<C> collection)
- Create a predicate that tests whether an element is not a member of a
collection.
- Parameters:
elem - elementcollection - expression
- Returns:
- predicate
isMember
<E,C extends java.util.Collection<E>> Predicate isMember(Expression<E> elem,
Expression<C> collection)
- Create a predicate that tests whether an element is a member of a
collection.
- Parameters:
elem - element expressioncollection - expression
- Returns:
- predicate
isNotMember
<E,C extends java.util.Collection<E>> Predicate isNotMember(Expression<E> elem,
Expression<C> collection)
- Create a predicate that tests whether an element is not a member of a
collection.
- Parameters:
elem - element expressioncollection - expression
- Returns:
- predicate
values
<V,M extends java.util.Map<?,V>> Expression<java.util.Collection<V>> values(M map)
- Create an expression that returns the values of a map.
- Parameters:
map -
- Returns:
- collection expression
keys
<K,M extends java.util.Map<K,?>> Expression<java.util.Set<K>> keys(M map)
- Create an expression that returns the keys of a map.
- Parameters:
map -
- Returns:
- set expression
like
Predicate like(Expression<java.lang.String> x,
Expression<java.lang.String> pattern)
- Create a predicate for testing whether the expression satisfies the given
pattern.
- Parameters:
x - string expressionpattern - string expression
- Returns:
- like predicate
like
Predicate like(Expression<java.lang.String> x,
Expression<java.lang.String> pattern,
Expression<java.lang.Character> escapeChar)
- Create a predicate for testing whether the expression satisfies the given
pattern.
- Parameters:
x - string expressionpattern - string expressionescapeChar - escape character expression
- Returns:
- like predicate
like
Predicate like(Expression<java.lang.String> x,
Expression<java.lang.String> pattern,
char escapeChar)
- Create a predicate for testing whether the expression satisfies the given
pattern.
- Parameters:
x - string expressionpattern - string expressionescapeChar - escape character
- Returns:
- like predicate
like
Predicate like(Expression<java.lang.String> x,
java.lang.String pattern)
- Create a predicate for testing whether the expression satisfies the given
pattern.
- Parameters:
x - string expressionpattern - string
- Returns:
- like predicate
like
Predicate like(Expression<java.lang.String> x,
java.lang.String pattern,
Expression<java.lang.Character> escapeChar)
- Create a predicate for testing whether the expression satisfies the given
pattern.
- Parameters:
x - string expressionpattern - stringescapeChar - escape character expression
- Returns:
- like predicate
like
Predicate like(Expression<java.lang.String> x,
java.lang.String pattern,
char escapeChar)
- Create a predicate for testing whether the expression satisfies the given
pattern.
- Parameters:
x - string expressionpattern - stringescapeChar - escape character
- Returns:
- like predicate
notLike
Predicate notLike(Expression<java.lang.String> x,
Expression<java.lang.String> pattern)
- Create a predicate for testing whether the expression does not satisfy
the given pattern.
- Parameters:
x - string expressionpattern - string expression
- Returns:
- like predicate
notLike
Predicate notLike(Expression<java.lang.String> x,
Expression<java.lang.String> pattern,
Expression<java.lang.Character> escapeChar)
- Create a predicate for testing whether the expression does not satisfy
the given pattern.
- Parameters:
x - string expressionpattern - string expressionescapeChar - escape character expression
- Returns:
- like predicate
notLike
Predicate notLike(Expression<java.lang.String> x,
Expression<java.lang.String> pattern,
char escapeChar)
- Create a predicate for testing whether the expression does not satisfy
the given pattern.
- Parameters:
x - string expressionpattern - string expressionescapeChar - escape character
- Returns:
- like predicate
notLike
Predicate notLike(Expression<java.lang.String> x,
java.lang.String pattern)
- Create a predicate for testing whether the expression does not satisfy
the given pattern.
- Parameters:
x - string expressionpattern - string
- Returns:
- like predicate
notLike
Predicate notLike(Expression<java.lang.String> x,
java.lang.String pattern,
Expression<java.lang.Character> escapeChar)
- Create a predicate for testing whether the expression does not satisfy
the given pattern.
- Parameters:
x - string expressionpattern - stringescapeChar - escape character expression
- Returns:
- like predicate
notLike
Predicate notLike(Expression<java.lang.String> x,
java.lang.String pattern,
char escapeChar)
- Create a predicate for testing whether the expression does not satisfy
the given pattern.
- Parameters:
x - string expressionpattern - stringescapeChar - escape character
- Returns:
- like predicate
concat
Expression<java.lang.String> concat(Expression<java.lang.String> x,
Expression<java.lang.String> y)
- String concatenation operation.
- Parameters:
x - string expressiony - string expression
- Returns:
- expression corresponding to concatenation
concat
Expression<java.lang.String> concat(Expression<java.lang.String> x,
java.lang.String y)
- String concatenation operation.
- Parameters:
x - string expressiony - string
- Returns:
- expression corresponding to concatenation
concat
Expression<java.lang.String> concat(java.lang.String x,
Expression<java.lang.String> y)
- String concatenation operation.
- Parameters:
x - stringy - string expression
- Returns:
- expression corresponding to concatenation
substring
Expression<java.lang.String> substring(Expression<java.lang.String> x,
Expression<java.lang.Integer> from)
- Substring extraction operation. Extracts a substring starting at
specified position through to end of the string. First position is 1.
- Parameters:
x - string expressionfrom - start position expression
- Returns:
- expression corresponding to substring extraction
substring
Expression<java.lang.String> substring(Expression<java.lang.String> x,
int from)
- Substring extraction operation. Extracts a substring starting at
specified position through to end of the string. First position is 1.
- Parameters:
x - string expressionfrom - start position
- Returns:
- expression corresponding to substring extraction
substring
Expression<java.lang.String> substring(Expression<java.lang.String> x,
Expression<java.lang.Integer> from,
Expression<java.lang.Integer> len)
- Substring extraction operation. Extracts a substring of given length
starting at specified position. First position is 1.
- Parameters:
x - string expressionfrom - start position expressionlen - length expression
- Returns:
- expression corresponding to substring extraction
substring
Expression<java.lang.String> substring(Expression<java.lang.String> x,
int from,
int len)
- Substring extraction operation. Extracts a substring of given length
starting at specified position. First position is 1.
- Parameters:
x - string expressionfrom - start positionlen - length
- Returns:
- expression corresponding to substring extraction
trim
Expression<java.lang.String> trim(Expression<java.lang.String> x)
- Create expression to trim blanks from both ends of a string.
- Parameters:
x - expression for string to trim
- Returns:
- trim expression
trim
Expression<java.lang.String> trim(QueryBuilder.Trimspec ts,
Expression<java.lang.String> x)
- Create expression to trim blanks from a string.
- Parameters:
ts - trim specificationx - expression for string to trim
- Returns:
- trim expression
trim
Expression<java.lang.String> trim(Expression<java.lang.Character> t,
Expression<java.lang.String> x)
- Create expression to trim character from both ends of a string.
- Parameters:
t - expression for character to be trimmedx - expression for string to trim
- Returns:
- trim expression
trim
Expression<java.lang.String> trim(QueryBuilder.Trimspec ts,
Expression<java.lang.Character> t,
Expression<java.lang.String> x)
- Create expression to trim character from a string.
- Parameters:
ts - trim specificationt - expression for character to be trimmedx - expression for string to trim
- Returns:
- trim expression
trim
Expression<java.lang.String> trim(char t,
Expression<java.lang.String> x)
- Create expression to trim character from both ends of a string.
- Parameters:
t - character to be trimmedx - expression for string to trim
- Returns:
- trim expression
trim
Expression<java.lang.String> trim(QueryBuilder.Trimspec ts,
char t,
Expression<java.lang.String> x)
- Create expression to trim character from a string.
- Parameters:
ts - trim specificationt - character to be trimmedx - expression for string to trim
- Returns:
- trim expression
lower
Expression<java.lang.String> lower(Expression<java.lang.String> x)
- Create expression for converting a string to lowercase.
- Parameters:
x - string expression
- Returns:
- expression to convert to lowercase
upper
Expression<java.lang.String> upper(Expression<java.lang.String> x)
- Create expression for converting a string to uppercase.
- Parameters:
x - string expression
- Returns:
- expression to convert to uppercase
length
Expression<java.lang.Integer> length(Expression<java.lang.String> x)
- Create expression to return length of a string.
- Parameters:
x - string expression
- Returns:
- length expression
locate
Expression<java.lang.Integer> locate(Expression<java.lang.String> x,
Expression<java.lang.String> pattern)
- Create expression to locate the position of one string within another,
returning position of first character if found. The first position in a
string is denoted by 1. If the string to be located is not found, 0 is
returned.
- Parameters:
x - expression for string to be searchedpattern - expression for string to be located
- Returns:
- expression corresponding to position
locate
Expression<java.lang.Integer> locate(Expression<java.lang.String> x,
Expression<java.lang.String> pattern,
Expression<java.lang.Integer> from)
- Create expression to locate the position of one string within another,
returning position of first character if found. The first position in a
string is denoted by 1. If the string to be located is not found, 0 is
returned.
- Parameters:
x - expression for string to be searchedpattern - expression for string to be locatedfrom - expression for position at which to start search
- Returns:
- expression corresponding to position
locate
Expression<java.lang.Integer> locate(Expression<java.lang.String> x,
java.lang.String pattern)
- Create expression to locate the position of one string within another,
returning position of first character if found. The first position in a
string is denoted by 1. If the string to be located is not found, 0 is
returned.
- Parameters:
x - expression for string to be searchedpattern - string to be located
- Returns:
- expression corresponding to position
locate
Expression<java.lang.Integer> locate(Expression<java.lang.String> x,
java.lang.String pattern,
int from)
- Create expression to locate the position of one string within another,
returning position of first character if found. The first position in a
string is denoted by 1. If the string to be located is not found, 0 is
returned.
- Parameters:
x - expression for string to be searchedpattern - string to be locatedfrom - position at which to start search
- Returns:
- expression corresponding to position
currentDate
Expression<java.sql.Date> currentDate()
- Create expression to return current date.
- Returns:
- expression for current date
currentTimestamp
Expression<java.sql.Timestamp> currentTimestamp()
- Create expression to return current timestamp.
- Returns:
- expression for current timestamp
currentTime
Expression<java.sql.Time> currentTime()
- Create expression to return current time.
- Returns:
- expression for current time
in
<T> QueryBuilder.In<T> in(Expression<? extends T> expression)
- Create predicate to test whether given expression is contained in a list
of values.
- Parameters:
expression - to be tested against list of values
- Returns:
- in predicate
coalesce
<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.
- Parameters:
x - expressiony - expression
- Returns:
- expression corresponding to the given coalesce expression
coalesce
<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.
- Parameters:
x - expressiony - value
- Returns:
- coalesce expression
nullif
<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.
- Parameters:
x - expressiony - expression
- Returns:
- expression corresponding to the given nullif expression
nullif
<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.
- Parameters:
x - expressiony - value
- Returns:
- expression corresponding to the given nullif expression
coalesce
<T> QueryBuilder.Coalesce<T> coalesce()
- Create a coalesce expression.
- Returns:
- coalesce expression
selectCase
<C,R> QueryBuilder.SimpleCase<C,R> selectCase(Expression<? extends C> expression)
- Create simple case expression.
- Parameters:
expression - to be tested against the case conditions
- Returns:
- simple case expression
selectCase
<R> QueryBuilder.Case<R> selectCase()
- Create a general case expression.
- Returns:
- general case expression
function
<T> Expression<T> function(java.lang.String name,
java.lang.Class<T> type,
Expression<?>... args)
- Create an expression for execution of a database function.
- Parameters:
name - function nametype - expected result typeargs - function arguments
- Returns:
- expression