javax.persistence.criteria

## Interface CriteriaBuilder

    public interface CriteriaBuilder

### Nested Class Summary

Nested Classes
`static interface` `CriteriaBuilder.Case<R>`
`static interface` `CriteriaBuilder.Coalesce<T>`
`static interface` `CriteriaBuilder.In<T>`
`static interface` `CriteriaBuilder.SimpleCase<C,R>`
`static class` `CriteriaBuilder.Trimspec`

### Method Summary

All Methods Instance Methods Abstract Methods
`<N extends Number> Expression<N>` `abs(Expression<N> x)`
`<Y> Expression<Y>` `all(Subquery<Y> subquery)`
`Predicate` `and(Expression<Boolean> x, Expression<Boolean> y)`
`Predicate` `and(Predicate... restrictions)`
`<Y> Expression<Y>` `any(Subquery<Y> subquery)`
`CompoundSelection<Object[]>` `array(Selection<?>... selections)`
`Order` `asc(Expression<?> x)`
`<N extends Number> Expression<Double>` `avg(Expression<N> x)`
`<Y extends Comparable<? super Y>> Predicate` `between(Expression<? extends Y> v, Expression<? extends Y> x, Expression<? extends Y> y)`
`<Y extends Comparable<? super Y>> Predicate` `between(Expression<? extends Y> v, Y x, Y y)`
`<T> CriteriaBuilder.Coalesce<T>` `coalesce()`
`<Y> Expression<Y>` `coalesce(Expression<? extends Y> x, Expression<? extends Y> y)`
`<Y> Expression<Y>` `coalesce(Expression<? extends Y> x, Y y)`
`Expression<String>` `concat(Expression<String> x, Expression<String> y)`
`Expression<String>` `concat(Expression<String> x, String y)`
`Expression<String>` `concat(String x, Expression<String> y)`
`Predicate` `conjunction()`
`<Y> CompoundSelection<Y>` `construct(Class<Y> resultClass, Selection<?>... selections)`
`Expression<Long>` `count(Expression<?> x)`
`Expression<Long>` `countDistinct(Expression<?> x)`
`CriteriaQuery<Object>` `createQuery()`
`<T> CriteriaQuery<T>` `createQuery(Class<T> resultClass)`
`CriteriaQuery<Tuple>` `createTupleQuery()`
`Expression<Date>` `currentDate()`
`Expression<Time>` `currentTime()`
`Expression<Timestamp>` `currentTimestamp()`
`Order` `desc(Expression<?> x)`
`<N extends Number> Expression<N>` `diff(Expression<? extends N> x, Expression<? extends N> y)`
`<N extends Number> Expression<N>` `diff(Expression<? extends N> x, N y)`
`<N extends Number> Expression<N>` `diff(N x, Expression<? extends N> y)`
`Predicate` `disjunction()`
`Predicate` `equal(Expression<?> x, Expression<?> y)`
`Predicate` `equal(Expression<?> x, Object y)`
`Predicate` `exists(Subquery<?> subquery)`
`<T> Expression<T>` `function(String name, Class<T> type, Expression<?>... args)`
`Predicate` `ge(Expression<? extends Number> x, Expression<? extends Number> y)`
`Predicate` `ge(Expression<? extends Number> x, Number y)`
`<Y extends Comparable<? super Y>> Predicate` `greaterThan(Expression<? extends Y> x, Expression<? extends Y> y)`
`<Y extends Comparable<? super Y>> Predicate` `greaterThan(Expression<? extends Y> x, Y y)`
`<Y extends Comparable<? super Y>> Predicate` `greaterThanOrEqualTo(Expression<? extends Y> x, Expression<? extends Y> y)`
`<Y extends Comparable<? super Y>> Predicate` `greaterThanOrEqualTo(Expression<? extends Y> x, Y y)`
`<X extends Comparable<? super X>> Expression<X>` `greatest(Expression<X> x)`
`Predicate` `gt(Expression<? extends Number> x, Expression<? extends Number> y)`
`Predicate` `gt(Expression<? extends Number> x, Number y)`
`<T> CriteriaBuilder.In<T>` `in(Expression<? extends T> expression)`
`<C extends Collection<?>> Predicate` `isEmpty(Expression<C> collection)`
`Predicate` `isFalse(Expression<Boolean> x)`
`<E,C extends Collection<E>> Predicate` `isMember(E elem, Expression<C> collection)`
`<E,C extends Collection<E>> Predicate` `isMember(Expression<E> elem, Expression<C> collection)`
`<C extends Collection<?>> Predicate` `isNotEmpty(Expression<C> collection)`
`<E,C extends Collection<E>> Predicate` `isNotMember(E elem, Expression<C> collection)`
`<E,C extends Collection<E>> Predicate` `isNotMember(Expression<E> elem, Expression<C> collection)`
`Predicate` `isNotNull(Expression<?> x)`
`Predicate` `isNull(Expression<?> x)`
`Predicate` `isTrue(Expression<Boolean> x)`
`<K,M extends Map<K,?>> Expression<Set<K>>` `keys(M map)`
`Predicate` `le(Expression<? extends Number> x, Expression<? extends Number> y)`
`Predicate` `le(Expression<? extends Number> x, Number y)`
`<X extends Comparable<? super X>> Expression<X>` `least(Expression<X> x)`
`Expression<Integer>` `length(Expression<String> x)`
`<Y extends Comparable<? super Y>> Predicate` `lessThan(Expression<? extends Y> x, Expression<? extends Y> y)`
`<Y extends Comparable<? super Y>> Predicate` `lessThan(Expression<? extends Y> x, Y y)`
`<Y extends Comparable<? super Y>> Predicate` `lessThanOrEqualTo(Expression<? extends Y> x, Expression<? extends Y> y)`
`<Y extends Comparable<? super Y>> Predicate` `lessThanOrEqualTo(Expression<? extends Y> x, Y y)`
`Predicate` `like(Expression<String> x, Expression<String> pattern)`
`Predicate` `like(Expression<String> x, Expression<String> pattern, char escapeChar)`
`Predicate` `like(Expression<String> x, Expression<String> pattern, Expression<Character> escapeChar)`
`Predicate` `like(Expression<String> x, String pattern)`
`Predicate` `like(Expression<String> x, String pattern, char escapeChar)`
`Predicate` `like(Expression<String> x, String pattern, Expression<Character> escapeChar)`
`<T> Expression<T>` `literal(T value)`
`Expression<Integer>` `locate(Expression<String> x, Expression<String> pattern)`
`Expression<Integer>` `locate(Expression<String> x, Expression<String> pattern, Expression<Integer> from)`
`Expression<Integer>` `locate(Expression<String> x, String pattern)`
`Expression<Integer>` `locate(Expression<String> x, String pattern, int from)`
`Expression<String>` `lower(Expression<String> x)`
`Predicate` `lt(Expression<? extends Number> x, Expression<? extends Number> y)`
`Predicate` `lt(Expression<? extends Number> x, Number y)`
`<N extends Number> Expression<N>` `max(Expression<N> x)`
`<N extends Number> Expression<N>` `min(Expression<N> x)`
`Expression<Integer>` `mod(Expression<Integer> x, Expression<Integer> y)`
`Expression<Integer>` `mod(Expression<Integer> x, Integer y)`
`Expression<Integer>` `mod(Integer x, Expression<Integer> y)`
`<N extends Number> Expression<N>` `neg(Expression<N> x)`
`Predicate` `not(Expression<Boolean> restriction)`
`Predicate` `notEqual(Expression<?> x, Expression<?> y)`
`Predicate` `notEqual(Expression<?> x, Object y)`
`Predicate` `notLike(Expression<String> x, Expression<String> pattern)`
`Predicate` `notLike(Expression<String> x, Expression<String> pattern, char escapeChar)`
`Predicate` `notLike(Expression<String> x, Expression<String> pattern, Expression<Character> escapeChar)`
`Predicate` `notLike(Expression<String> x, String pattern)`
`Predicate` `notLike(Expression<String> x, String pattern, char escapeChar)`
`Predicate` `notLike(Expression<String> x, String pattern, Expression<Character> escapeChar)`
`<Y> Expression<Y>` `nullif(Expression<Y> x, Expression<?> y)`
`<Y> Expression<Y>` `nullif(Expression<Y> x, Y y)`
`<T> Expression<T>` `nullLiteral(Class<T> resultClass)`
`Predicate` `or(Expression<Boolean> x, Expression<Boolean> y)`
`Predicate` `or(Predicate... restrictions)`
`<T> ParameterExpression<T>` `parameter(Class<T> paramClass)`
`<T> ParameterExpression<T>` `parameter(Class<T> paramClass, String name)`
`<N extends Number> Expression<N>` `prod(Expression<? extends N> x, Expression<? extends N> y)`
`<N extends Number> Expression<N>` `prod(Expression<? extends N> x, N y)`
`<N extends Number> Expression<N>` `prod(N x, Expression<? extends N> y)`
`Expression<Number>` `quot(Expression<? extends Number> x, Expression<? extends Number> y)`
`Expression<Number>` `quot(Expression<? extends Number> x, Number y)`
`Expression<Number>` `quot(Number x, Expression<? extends Number> y)`
`<R> CriteriaBuilder.Case<R>` `selectCase()`
`<C,R> CriteriaBuilder.SimpleCase<C,R>` `selectCase(Expression<? extends C> expression)`
`<C extends Collection<?>> Expression<Integer>` `size(C collection)`
`<C extends Collection<?>> Expression<Integer>` `size(Expression<C> collection)`
`<Y> Expression<Y>` `some(Subquery<Y> subquery)`
`Expression<Double>` `sqrt(Expression<? extends Number> x)`
`Expression<String>` `substring(Expression<String> x, Expression<Integer> from)`
`Expression<String>` `substring(Expression<String> x, Expression<Integer> from, Expression<Integer> len)`
`Expression<String>` `substring(Expression<String> x, int from)`
`Expression<String>` `substring(Expression<String> x, int from, int len)`
`<N extends Number> Expression<N>` `sum(Expression<? extends N> x, Expression<? extends N> y)`
`<N extends Number> Expression<N>` `sum(Expression<? extends N> x, N y)`
`<N extends Number> Expression<N>` `sum(Expression<N> x)`
`<N extends Number> Expression<N>` `sum(N x, Expression<? extends N> y)`
`Expression<Double>` `sumAsDouble(Expression<Float> x)`
`Expression<Long>` `sumAsLong(Expression<Integer> x)`
`Expression<BigDecimal>` `toBigDecimal(Expression<? extends Number> number)`
`Expression<BigInteger>` `toBigInteger(Expression<? extends Number> number)`
`Expression<Double>` `toDouble(Expression<? extends Number> number)`
`Expression<Float>` `toFloat(Expression<? extends Number> number)`
`Expression<Integer>` `toInteger(Expression<? extends Number> number)`
`Expression<Long>` `toLong(Expression<? extends Number> number)`
`Expression<String>` `toString(Expression<Character> character)`
`Expression<String>` `trim(char t, Expression<String> x)`
`Expression<String>` `trim(CriteriaBuilder.Trimspec ts, char t, Expression<String> x)`
`Expression<String>` `trim(CriteriaBuilder.Trimspec ts, Expression<Character> t, Expression<String> x)`
`Expression<String>` `trim(CriteriaBuilder.Trimspec ts, Expression<String> x)`
`Expression<String>` `trim(Expression<Character> t, Expression<String> x)`
`Expression<String>` `trim(Expression<String> x)`
`CompoundSelection<Tuple>` `tuple(Selection<?>... selections)`
`Expression<String>` `upper(Expression<String> x)`
`<V,M extends Map<?,V>> Expression<Collection<V>>` `values(M map)`

### Method Detail

#### createQuery

    CriteriaQuery<Object> createQuery()

#### createQuery

    <T> CriteriaQuery<T> createQuery(Class<T> resultClass)

#### createTupleQuery

    CriteriaQuery<Tuple> createTupleQuery()

#### construct

    <Y> CompoundSelection<Y> construct(Class<Y> resultClass,
                                       Selection<?>... selections)

#### tuple

    CompoundSelection<Tuple> tuple(Selection<?>... selections)

#### array

    CompoundSelection<Object[]> array(Selection<?>... selections)

#### asc

    Order asc(Expression<?> x)

#### desc

    Order desc(Expression<?> x)

#### avg

    <N extends Number> Expression<Double> avg(Expression<N> x)

#### sum

    <N extends Number> Expression<N> sum(Expression<N> x)

#### sumAsLong

    Expression<Long> sumAsLong(Expression<Integer> x)

#### sumAsDouble

    Expression<Double> sumAsDouble(Expression<Float> x)

#### max

    <N extends Number> Expression<N> max(Expression<N> x)

#### min

    <N extends Number> Expression<N> min(Expression<N> x)

#### greatest

    <X extends Comparable<? super X>> Expression<X> greatest(Expression<X> x)

#### least

    <X extends Comparable<? super X>> Expression<X> least(Expression<X> x)

#### count

    Expression<Long> count(Expression<?> x)

#### countDistinct

    Expression<Long> countDistinct(Expression<?> x)

#### exists

    Predicate exists(Subquery<?> subquery)

#### all

    <Y> Expression<Y> all(Subquery<Y> subquery)

#### some

    <Y> Expression<Y> some(Subquery<Y> subquery)

#### any

    <Y> Expression<Y> any(Subquery<Y> subquery)

#### and

    Predicate and(Expression<Boolean> x,
                  Expression<Boolean> y)

#### and

    Predicate and(Predicate... restrictions)

#### or

    Predicate or(Expression<Boolean> x,
                 Expression<Boolean> y)

#### or

    Predicate or(Predicate... restrictions)

#### not

    Predicate not(Expression<Boolean> restriction)

#### conjunction

    Predicate conjunction()

#### disjunction

    Predicate disjunction()

#### isTrue

    Predicate isTrue(Expression<Boolean> x)

#### isFalse

    Predicate isFalse(Expression<Boolean> x)

#### isNull

    Predicate isNull(Expression<?> x)

#### isNotNull

    Predicate isNotNull(Expression<?> x)

#### equal

    Predicate equal(Expression<?> x,
                    Expression<?> y)

#### equal

    Predicate equal(Expression<?> x,
                    Object y)

#### notEqual

    Predicate notEqual(Expression<?> x,
                       Expression<?> y)

#### notEqual

    Predicate notEqual(Expression<?> x,
                       Object y)

#### greaterThan

    <Y extends Comparable<? super Y>> Predicate greaterThan(Expression<? extends Y> x,
                                                            Expression<? extends Y> y)

#### greaterThan

    <Y extends Comparable<? super Y>> Predicate greaterThan(Expression<? extends Y> x,
                                                            Y y)

#### greaterThanOrEqualTo

    <Y extends Comparable<? super Y>> Predicate greaterThanOrEqualTo(Expression<? extends Y> x,
                                                                     Expression<? extends Y> y)

#### greaterThanOrEqualTo

    <Y extends Comparable<? super Y>> Predicate greaterThanOrEqualTo(Expression<? extends Y> x,
                                                                     Y y)

#### lessThan

    <Y extends Comparable<? super Y>> Predicate lessThan(Expression<? extends Y> x,
                                                         Expression<? extends Y> y)

#### lessThan

    <Y extends Comparable<? super Y>> Predicate lessThan(Expression<? extends Y> x,
                                                         Y y)

#### lessThanOrEqualTo

    <Y extends Comparable<? super Y>> Predicate lessThanOrEqualTo(Expression<? extends Y> x,
                                                                  Expression<? extends Y> y)

#### lessThanOrEqualTo

    <Y extends Comparable<? super Y>> Predicate lessThanOrEqualTo(Expression<? extends Y> x,
                                                                  Y y)

#### between

    <Y extends Comparable<? super Y>> Predicate between(Expression<? extends Y> v,
                                                        Expression<? extends Y> x,
                                                        Expression<? extends Y> y)

#### between

    <Y extends Comparable<? super Y>> Predicate between(Expression<? extends Y> v,
                                                        Y x,
                                                        Y y)

#### gt

    Predicate gt(Expression<? extends Number> x,
                 Expression<? extends Number> y)

#### gt

    Predicate gt(Expression<? extends Number> x,
                 Number y)

#### ge

    Predicate ge(Expression<? extends Number> x,
                 Expression<? extends Number> y)

#### ge

    Predicate ge(Expression<? extends Number> x,
                 Number y)

#### lt

    Predicate lt(Expression<? extends Number> x,
                 Expression<? extends Number> y)

#### lt

    Predicate lt(Expression<? extends Number> x,
                 Number y)

#### le

    Predicate le(Expression<? extends Number> x,
                 Expression<? extends Number> y)

#### le

    Predicate le(Expression<? extends Number> x,
                 Number y)

#### neg

    <N extends Number> Expression<N> neg(Expression<N> x)

#### abs

    <N extends Number> Expression<N> abs(Expression<N> x)

#### sum

    <N extends Number> Expression<N> sum(Expression<? extends N> x,
                                         Expression<? extends N> y)

#### sum

    <N extends Number> Expression<N> sum(Expression<? extends N> x,
                                         N y)

#### sum

    <N extends Number> Expression<N> sum(N x,
                                         Expression<? extends N> y)

#### prod

    <N extends Number> Expression<N> prod(Expression<? extends N> x,
                                          Expression<? extends N> y)

#### prod

    <N extends Number> Expression<N> prod(Expression<? extends N> x,
                                          N y)

#### prod

    <N extends Number> Expression<N> prod(N x,
                                          Expression<? extends N> y)

#### diff

    <N extends Number> Expression<N> diff(Expression<? extends N> x,
                                          Expression<? extends N> y)

#### diff

    <N extends Number> Expression<N> diff(Expression<? extends N> x,
                                          N y)

#### diff

    <N extends Number> Expression<N> diff(N x,
                                          Expression<? extends N> y)

#### quot

    Expression<Number> quot(Expression<? extends Number> x,
                            Expression<? extends Number> y)

#### quot

    Expression<Number> quot(Expression<? extends Number> x,
                            Number y)

#### quot

    Expression<Number> quot(Number x,
                            Expression<? extends Number> y)

#### mod

    Expression<Integer> mod(Expression<Integer> x,
                            Expression<Integer> y)

#### mod

    Expression<Integer> mod(Expression<Integer> x,
                            Integer y)

#### mod

    Expression<Integer> mod(Integer x,
                            Expression<Integer> y)

#### sqrt

    Expression<Double> sqrt(Expression<? extends Number> x)

#### toLong

    Expression<Long> toLong(Expression<? extends Number> number)

#### toInteger

    Expression<Integer> toInteger(Expression<? extends Number> number)

#### toFloat

    Expression<Float> toFloat(Expression<? extends Number> number)

#### toDouble

    Expression<Double> toDouble(Expression<? extends Number> number)

#### toBigDecimal

    Expression<BigDecimal> toBigDecimal(Expression<? extends Number> number)

#### toBigInteger

    Expression<BigInteger> toBigInteger(Expression<? extends Number> number)

#### toString

    Expression<String> toString(Expression<Character> character)

#### literal

    <T> Expression<T> literal(T value)

#### nullLiteral

    <T> Expression<T> nullLiteral(Class<T> resultClass)

#### parameter

    <T> ParameterExpression<T> parameter(Class<T> paramClass)

#### parameter

    <T> ParameterExpression<T> parameter(Class<T> paramClass,
                                         String name)

#### isEmpty

    <C extends Collection<?>> Predicate isEmpty(Expression<C> collection)

#### isNotEmpty

    <C extends Collection<?>> Predicate isNotEmpty(Expression<C> collection)

#### size

    <C extends Collection<?>> Expression<Integer> size(Expression<C> collection)

#### size

    <C extends Collection<?>> Expression<Integer> size(C collection)

#### isMember

    <E,C extends Collection<E>> Predicate isMember(Expression<E> elem,
                                                   Expression<C> collection)

#### isMember

    <E,C extends Collection<E>> Predicate isMember(E elem,
                                                   Expression<C> collection)

#### isNotMember

    <E,C extends Collection<E>> Predicate isNotMember(Expression<E> elem,
                                                      Expression<C> collection)

#### isNotMember

    <E,C extends Collection<E>> Predicate isNotMember(E elem,
                                                      Expression<C> collection)

#### values

    <V,M extends Map<?,V>> Expression<Collection<V>> values(M map)

#### keys

    <K,M extends Map<K,?>> Expression<Set<K>> keys(M map)

#### like

    Predicate like(Expression<String> x,
                   Expression<String> pattern)

#### like

    Predicate like(Expression<String> x,
                   String pattern)

#### like

    Predicate like(Expression<String> x,
                   Expression<String> pattern,
                   Expression<Character> escapeChar)

#### like

    Predicate like(Expression<String> x,
                   Expression<String> pattern,
                   char escapeChar)

#### like

    Predicate like(Expression<String> x,
                   String pattern,
                   Expression<Character> escapeChar)

#### like

    Predicate like(Expression<String> x,
                   String pattern,
                   char escapeChar)

#### notLike

    Predicate notLike(Expression<String> x,
                      Expression<String> pattern)

#### notLike

    Predicate notLike(Expression<String> x,
                      String pattern)

#### notLike

    Predicate notLike(Expression<String> x,
                      Expression<String> pattern,
                      Expression<Character> escapeChar)

#### notLike

    Predicate notLike(Expression<String> x,
                      Expression<String> pattern,
                      char escapeChar)

#### notLike

    Predicate notLike(Expression<String> x,
                      String pattern,
                      Expression<Character> escapeChar)

#### notLike

    Predicate notLike(Expression<String> x,
                      String pattern,
                      char escapeChar)

#### concat

    Expression<String> concat(Expression<String> x,
                              Expression<String> y)

#### concat

    Expression<String> concat(Expression<String> x,
                              String y)

#### concat

    Expression<String> concat(String x,
                              Expression<String> y)

#### substring

    Expression<String> substring(Expression<String> x,
                                 Expression<Integer> from)

#### substring

    Expression<String> substring(Expression<String> x,
                                 int from)

#### substring

    Expression<String> substring(Expression<String> x,
                                 Expression<Integer> from,
                                 Expression<Integer> len)

#### substring

    Expression<String> substring(Expression<String> x,
                                 int from,
                                 int len)

#### trim

    Expression<String> trim(Expression<String> x)

#### trim

    Expression<String> trim(CriteriaBuilder.Trimspec ts,
                            Expression<String> x)

#### trim

    Expression<String> trim(Expression<Character> t,
                            Expression<String> x)

#### trim

    Expression<String> trim(CriteriaBuilder.Trimspec ts,
                            Expression<Character> t,
                            Expression<String> x)

#### trim

    Expression<String> trim(char t,
                            Expression<String> x)

#### trim

    Expression<String> trim(CriteriaBuilder.Trimspec ts,
                            char t,
                            Expression<String> x)

#### lower

    Expression<String> lower(Expression<String> x)

#### upper

    Expression<String> upper(Expression<String> x)

#### length

    Expression<Integer> length(Expression<String> x)

#### locate

    Expression<Integer> locate(Expression<String> x,
                               Expression<String> pattern)

#### locate

    Expression<Integer> locate(Expression<String> x,
                               String pattern)

#### locate

    Expression<Integer> locate(Expression<String> x,
                               Expression<String> pattern,
                               Expression<Integer> from)

#### locate

    Expression<Integer> locate(Expression<String> x,
                               String pattern,
                               int from)

#### currentDate

    Expression<Date> currentDate()

#### currentTimestamp

    Expression<Timestamp> currentTimestamp()

#### currentTime

    Expression<Time> currentTime()

#### in

    <T> CriteriaBuilder.In<T> in(Expression<? extends T> expression)

#### coalesce

    <Y> Expression<Y> coalesce(Expression<? extends Y> x,
                               Expression<? extends Y> y)

#### coalesce

    <Y> Expression<Y> coalesce(Expression<? extends Y> x,
                               Y y)

#### nullif

    <Y> Expression<Y> nullif(Expression<Y> x,
                             Expression<?> y)

#### nullif

    <Y> Expression<Y> nullif(Expression<Y> x,
                             Y y)

#### coalesce

    <T> CriteriaBuilder.Coalesce<T> coalesce()

#### selectCase

    <C,R> CriteriaBuilder.SimpleCase<C,R> selectCase(Expression<? extends C> expression)

#### selectCase

    <R> CriteriaBuilder.Case<R> selectCase()

#### function

    <T> Expression<T> function(String name,
                               Class<T> type,
                               Expression<?>... args)