public class CriteriaBuilderImpl extends Object implements CriteriaBuilder, Serializable
CriteriaBuilder
contract.CriteriaBuilder.Case<R>, CriteriaBuilder.Coalesce<T>, CriteriaBuilder.In<T>, CriteriaBuilder.SimpleCase<C,R>, CriteriaBuilder.Trimspec
Constructor and Description |
---|
CriteriaBuilderImpl(EntityManagerFactoryImpl entityManagerFactory) |
public CriteriaBuilderImpl(EntityManagerFactoryImpl entityManagerFactory)
public EntityManagerFactoryImpl getEntityManagerFactory()
EntityManagerFactoryImpl
.EntityManagerFactoryImpl
public CriteriaQuery<Object> createQuery()
createQuery
in interface CriteriaBuilder
public <T> CriteriaQuery<T> createQuery(Class<T> resultClass)
createQuery
in interface CriteriaBuilder
public CriteriaQuery<Tuple> createTupleQuery()
createTupleQuery
in interface CriteriaBuilder
public <T> CriteriaUpdate<T> createCriteriaUpdate(Class<T> targetEntity)
createCriteriaUpdate
in interface CriteriaBuilder
public <T> CriteriaDelete<T> createCriteriaDelete(Class<T> targetEntity)
createCriteriaDelete
in interface CriteriaBuilder
public CompoundSelection<Tuple> tuple(Selection<?>... selections)
tuple
in interface CriteriaBuilder
public CompoundSelection<Tuple> tuple(List<Selection<?>> selections)
tuple(Selection[])
taking a list.selections
- List of selections.public CompoundSelection<Object[]> array(Selection<?>... selections)
array
in interface CriteriaBuilder
public CompoundSelection<Object[]> array(List<Selection<?>> selections)
array(Selection[])
taking a list of selections.selections
- List of selections.public <Y> CompoundSelection<Y> array(Class<Y> type, List<Selection<?>> selections)
array(Selection[])
taking a list of selections,
as well as the type of array.type
- The type of arrayselections
- List of selections.public <Y> CompoundSelection<Y> construct(Class<Y> result, Selection<?>... selections)
construct
in interface CriteriaBuilder
public <Y> CompoundSelection<Y> construct(Class<Y> result, List<Selection<?>> selections)
construct(Class,Selection[])
taking the
to-be-constructed type as well as a list of selections.result
- The result class to be constructed.selections
- The selections to use in the constructor call.public Order asc(Expression<?> x)
asc
in interface CriteriaBuilder
public Order desc(Expression<?> x)
desc
in interface CriteriaBuilder
public Predicate wrap(Expression<Boolean> expression)
public Predicate not(Expression<Boolean> expression)
not
in interface CriteriaBuilder
public Predicate and(Expression<Boolean> x, Expression<Boolean> y)
and
in interface CriteriaBuilder
public Predicate or(Expression<Boolean> x, Expression<Boolean> y)
or
in interface CriteriaBuilder
public Predicate and(Predicate... restrictions)
and
in interface CriteriaBuilder
public Predicate or(Predicate... restrictions)
or
in interface CriteriaBuilder
public Predicate conjunction()
conjunction
in interface CriteriaBuilder
public Predicate disjunction()
disjunction
in interface CriteriaBuilder
public Predicate isTrue(Expression<Boolean> expression)
isTrue
in interface CriteriaBuilder
public Predicate isFalse(Expression<Boolean> expression)
isFalse
in interface CriteriaBuilder
public Predicate isNull(Expression<?> x)
isNull
in interface CriteriaBuilder
public Predicate isNotNull(Expression<?> x)
isNotNull
in interface CriteriaBuilder
public Predicate equal(Expression<?> x, Expression<?> y)
equal
in interface CriteriaBuilder
public Predicate notEqual(Expression<?> x, Expression<?> y)
notEqual
in interface CriteriaBuilder
public Predicate equal(Expression<?> x, Object y)
equal
in interface CriteriaBuilder
public Predicate notEqual(Expression<?> x, Object y)
notEqual
in interface CriteriaBuilder
public <Y extends Comparable<? super Y>> Predicate greaterThan(Expression<? extends Y> x, Expression<? extends Y> y)
greaterThan
in interface CriteriaBuilder
public <Y extends Comparable<? super Y>> Predicate lessThan(Expression<? extends Y> x, Expression<? extends Y> y)
lessThan
in interface CriteriaBuilder
public <Y extends Comparable<? super Y>> Predicate greaterThanOrEqualTo(Expression<? extends Y> x, Expression<? extends Y> y)
greaterThanOrEqualTo
in interface CriteriaBuilder
public <Y extends Comparable<? super Y>> Predicate lessThanOrEqualTo(Expression<? extends Y> x, Expression<? extends Y> y)
lessThanOrEqualTo
in interface CriteriaBuilder
public <Y extends Comparable<? super Y>> Predicate greaterThan(Expression<? extends Y> x, Y y)
greaterThan
in interface CriteriaBuilder
public <Y extends Comparable<? super Y>> Predicate lessThan(Expression<? extends Y> x, Y y)
lessThan
in interface CriteriaBuilder
public <Y extends Comparable<? super Y>> Predicate greaterThanOrEqualTo(Expression<? extends Y> x, Y y)
greaterThanOrEqualTo
in interface CriteriaBuilder
public <Y extends Comparable<? super Y>> Predicate lessThanOrEqualTo(Expression<? extends Y> x, Y y)
lessThanOrEqualTo
in interface CriteriaBuilder
public Predicate gt(Expression<? extends Number> x, Expression<? extends Number> y)
gt
in interface CriteriaBuilder
public Predicate lt(Expression<? extends Number> x, Expression<? extends Number> y)
lt
in interface CriteriaBuilder
public Predicate ge(Expression<? extends Number> x, Expression<? extends Number> y)
ge
in interface CriteriaBuilder
public Predicate le(Expression<? extends Number> x, Expression<? extends Number> y)
le
in interface CriteriaBuilder
public Predicate gt(Expression<? extends Number> x, Number y)
gt
in interface CriteriaBuilder
public Predicate lt(Expression<? extends Number> x, Number y)
lt
in interface CriteriaBuilder
public Predicate ge(Expression<? extends Number> x, Number y)
ge
in interface CriteriaBuilder
public Predicate le(Expression<? extends Number> x, Number y)
le
in interface CriteriaBuilder
public <Y extends Comparable<? super Y>> Predicate between(Expression<? extends Y> expression, Y lowerBound, Y upperBound)
between
in interface CriteriaBuilder
public <Y extends Comparable<? super Y>> Predicate between(Expression<? extends Y> expression, Expression<? extends Y> lowerBound, Expression<? extends Y> upperBound)
between
in interface CriteriaBuilder
public <T> CriteriaBuilder.In<T> in(Expression<? extends T> expression)
in
in interface CriteriaBuilder
public <T> CriteriaBuilder.In<T> in(Expression<? extends T> expression, Expression<? extends T>... values)
public <T> CriteriaBuilder.In<T> in(Expression<? extends T> expression, T... values)
public <T> CriteriaBuilder.In<T> in(Expression<? extends T> expression, Collection<T> values)
public Predicate like(Expression<String> matchExpression, Expression<String> pattern)
like
in interface CriteriaBuilder
public Predicate like(Expression<String> matchExpression, Expression<String> pattern, Expression<Character> escapeCharacter)
like
in interface CriteriaBuilder
public Predicate like(Expression<String> matchExpression, Expression<String> pattern, char escapeCharacter)
like
in interface CriteriaBuilder
public Predicate like(Expression<String> matchExpression, String pattern)
like
in interface CriteriaBuilder
public Predicate like(Expression<String> matchExpression, String pattern, Expression<Character> escapeCharacter)
like
in interface CriteriaBuilder
public Predicate like(Expression<String> matchExpression, String pattern, char escapeCharacter)
like
in interface CriteriaBuilder
public Predicate notLike(Expression<String> matchExpression, Expression<String> pattern)
notLike
in interface CriteriaBuilder
public Predicate notLike(Expression<String> matchExpression, Expression<String> pattern, Expression<Character> escapeCharacter)
notLike
in interface CriteriaBuilder
public Predicate notLike(Expression<String> matchExpression, Expression<String> pattern, char escapeCharacter)
notLike
in interface CriteriaBuilder
public Predicate notLike(Expression<String> matchExpression, String pattern)
notLike
in interface CriteriaBuilder
public Predicate notLike(Expression<String> matchExpression, String pattern, Expression<Character> escapeCharacter)
notLike
in interface CriteriaBuilder
public Predicate notLike(Expression<String> matchExpression, String pattern, char escapeCharacter)
notLike
in interface CriteriaBuilder
public <T> ParameterExpression<T> parameter(Class<T> paramClass)
parameter
in interface CriteriaBuilder
public <T> ParameterExpression<T> parameter(Class<T> paramClass, String name)
parameter
in interface CriteriaBuilder
public <T> Expression<T> literal(T value)
literal
in interface CriteriaBuilder
public <T> Expression<T> nullLiteral(Class<T> resultClass)
nullLiteral
in interface CriteriaBuilder
public <N extends Number> Expression<Double> avg(Expression<N> x)
avg
in interface CriteriaBuilder
public <N extends Number> Expression<N> sum(Expression<N> x)
sum
in interface CriteriaBuilder
public Expression<Long> sumAsLong(Expression<Integer> x)
sumAsLong
in interface CriteriaBuilder
public Expression<Double> sumAsDouble(Expression<Float> x)
sumAsDouble
in interface CriteriaBuilder
public <N extends Number> Expression<N> max(Expression<N> x)
max
in interface CriteriaBuilder
public <N extends Number> Expression<N> min(Expression<N> x)
min
in interface CriteriaBuilder
public <X extends Comparable<? super X>> Expression<X> greatest(Expression<X> x)
greatest
in interface CriteriaBuilder
public <X extends Comparable<? super X>> Expression<X> least(Expression<X> x)
least
in interface CriteriaBuilder
public Expression<Long> count(Expression<?> x)
count
in interface CriteriaBuilder
public Expression<Long> countDistinct(Expression<?> x)
countDistinct
in interface CriteriaBuilder
public <T> Expression<T> function(String name, Class<T> returnType, Expression<?>... arguments)
function
in interface CriteriaBuilder
public <T> Expression<T> function(String name, Class<T> returnType)
name
- The function name.returnType
- The return type.public <N extends Number> Expression<N> abs(Expression<N> expression)
abs
in interface CriteriaBuilder
public Expression<Double> sqrt(Expression<? extends Number> expression)
sqrt
in interface CriteriaBuilder
public Expression<Date> currentDate()
currentDate
in interface CriteriaBuilder
public Expression<Timestamp> currentTimestamp()
currentTimestamp
in interface CriteriaBuilder
public Expression<Time> currentTime()
currentTime
in interface CriteriaBuilder
public Expression<String> substring(Expression<String> value, Expression<Integer> start)
substring
in interface CriteriaBuilder
public Expression<String> substring(Expression<String> value, int start)
substring
in interface CriteriaBuilder
public Expression<String> substring(Expression<String> value, Expression<Integer> start, Expression<Integer> length)
substring
in interface CriteriaBuilder
public Expression<String> substring(Expression<String> value, int start, int length)
substring
in interface CriteriaBuilder
public Expression<String> trim(Expression<String> trimSource)
trim
in interface CriteriaBuilder
public Expression<String> trim(CriteriaBuilder.Trimspec trimspec, Expression<String> trimSource)
trim
in interface CriteriaBuilder
public Expression<String> trim(Expression<Character> trimCharacter, Expression<String> trimSource)
trim
in interface CriteriaBuilder
public Expression<String> trim(CriteriaBuilder.Trimspec trimspec, Expression<Character> trimCharacter, Expression<String> trimSource)
trim
in interface CriteriaBuilder
public Expression<String> trim(char trimCharacter, Expression<String> trimSource)
trim
in interface CriteriaBuilder
public Expression<String> trim(CriteriaBuilder.Trimspec trimspec, char trimCharacter, Expression<String> trimSource)
trim
in interface CriteriaBuilder
public Expression<String> lower(Expression<String> value)
lower
in interface CriteriaBuilder
public Expression<String> upper(Expression<String> value)
upper
in interface CriteriaBuilder
public Expression<Integer> length(Expression<String> value)
length
in interface CriteriaBuilder
public Expression<Integer> locate(Expression<String> string, Expression<String> pattern)
locate
in interface CriteriaBuilder
public Expression<Integer> locate(Expression<String> string, Expression<String> pattern, Expression<Integer> start)
locate
in interface CriteriaBuilder
public Expression<Integer> locate(Expression<String> string, String pattern)
locate
in interface CriteriaBuilder
public Expression<Integer> locate(Expression<String> string, String pattern, int start)
locate
in interface CriteriaBuilder
public <N extends Number> Expression<N> neg(Expression<N> expression)
neg
in interface CriteriaBuilder
public <N extends Number> Expression<N> sum(Expression<? extends N> expression1, Expression<? extends N> expression2)
sum
in interface CriteriaBuilder
public <N extends Number> Expression<N> prod(Expression<? extends N> expression1, Expression<? extends N> expression2)
prod
in interface CriteriaBuilder
public <N extends Number> Expression<N> diff(Expression<? extends N> expression1, Expression<? extends N> expression2)
diff
in interface CriteriaBuilder
public <N extends Number> Expression<N> sum(Expression<? extends N> expression, N n)
sum
in interface CriteriaBuilder
public <N extends Number> Expression<N> prod(Expression<? extends N> expression, N n)
prod
in interface CriteriaBuilder
public <N extends Number> Expression<N> diff(Expression<? extends N> expression, N n)
diff
in interface CriteriaBuilder
public <N extends Number> Expression<N> sum(N n, Expression<? extends N> expression)
sum
in interface CriteriaBuilder
public <N extends Number> Expression<N> prod(N n, Expression<? extends N> expression)
prod
in interface CriteriaBuilder
public <N extends Number> Expression<N> diff(N n, Expression<? extends N> expression)
diff
in interface CriteriaBuilder
public Expression<Number> quot(Expression<? extends Number> expression1, Expression<? extends Number> expression2)
quot
in interface CriteriaBuilder
public Expression<Number> quot(Expression<? extends Number> expression, Number number)
quot
in interface CriteriaBuilder
public Expression<Number> quot(Number number, Expression<? extends Number> expression)
quot
in interface CriteriaBuilder
public Expression<Integer> mod(Expression<Integer> expression1, Expression<Integer> expression2)
mod
in interface CriteriaBuilder
public Expression<Integer> mod(Expression<Integer> expression, Integer integer)
mod
in interface CriteriaBuilder
public Expression<Integer> mod(Integer integer, Expression<Integer> expression)
mod
in interface CriteriaBuilder
public ExpressionImplementor<Long> toLong(Expression<? extends Number> expression)
toLong
in interface CriteriaBuilder
public ExpressionImplementor<Integer> toInteger(Expression<? extends Number> expression)
toInteger
in interface CriteriaBuilder
public ExpressionImplementor<Float> toFloat(Expression<? extends Number> expression)
toFloat
in interface CriteriaBuilder
public ExpressionImplementor<Double> toDouble(Expression<? extends Number> expression)
toDouble
in interface CriteriaBuilder
public ExpressionImplementor<BigDecimal> toBigDecimal(Expression<? extends Number> expression)
toBigDecimal
in interface CriteriaBuilder
public ExpressionImplementor<BigInteger> toBigInteger(Expression<? extends Number> expression)
toBigInteger
in interface CriteriaBuilder
public ExpressionImplementor<String> toString(Expression<Character> characterExpression)
toString
in interface CriteriaBuilder
public <X,T,V extends T> Join<X,V> treat(Join<X,T> join, Class<V> type)
treat
in interface CriteriaBuilder
public <X,T,E extends T> CollectionJoin<X,E> treat(CollectionJoin<X,T> join, Class<E> type)
treat
in interface CriteriaBuilder
public <X,T,E extends T> SetJoin<X,E> treat(SetJoin<X,T> join, Class<E> type)
treat
in interface CriteriaBuilder
public <X,T,E extends T> ListJoin<X,E> treat(ListJoin<X,T> join, Class<E> type)
treat
in interface CriteriaBuilder
public <X,K,T,V extends T> MapJoin<X,K,V> treat(MapJoin<X,K,T> join, Class<V> type)
treat
in interface CriteriaBuilder
public <X,T extends X> Path<T> treat(Path<X> path, Class<T> type)
treat
in interface CriteriaBuilder
public <X,T extends X> Root<T> treat(Root<X> root, Class<T> type)
treat
in interface CriteriaBuilder
public Predicate exists(Subquery<?> subquery)
exists
in interface CriteriaBuilder
public <Y> Expression<Y> all(Subquery<Y> subquery)
all
in interface CriteriaBuilder
public <Y> Expression<Y> some(Subquery<Y> subquery)
some
in interface CriteriaBuilder
public <Y> Expression<Y> any(Subquery<Y> subquery)
any
in interface CriteriaBuilder
public <Y> Expression<Y> coalesce(Expression<? extends Y> exp1, Expression<? extends Y> exp2)
coalesce
in interface CriteriaBuilder
public <Y> Expression<Y> coalesce(Class<Y> type, Expression<? extends Y> exp1, Expression<? extends Y> exp2)
public <Y> Expression<Y> coalesce(Expression<? extends Y> exp1, Y exp2)
coalesce
in interface CriteriaBuilder
public <Y> Expression<Y> coalesce(Class<Y> type, Expression<? extends Y> exp1, Y exp2)
public <T> CriteriaBuilder.Coalesce<T> coalesce()
coalesce
in interface CriteriaBuilder
public <T> CriteriaBuilder.Coalesce<T> coalesce(Class<T> type)
public Expression<String> concat(Expression<String> string1, Expression<String> string2)
concat
in interface CriteriaBuilder
public Expression<String> concat(Expression<String> string1, String string2)
concat
in interface CriteriaBuilder
public Expression<String> concat(String string1, Expression<String> string2)
concat
in interface CriteriaBuilder
public <Y> Expression<Y> nullif(Expression<Y> exp1, Expression<?> exp2)
nullif
in interface CriteriaBuilder
public <Y> Expression<Y> nullif(Class<Y> type, Expression<Y> exp1, Expression<?> exp2)
public <Y> Expression<Y> nullif(Expression<Y> exp1, Y exp2)
nullif
in interface CriteriaBuilder
public <Y> Expression<Y> nullif(Class<Y> type, Expression<Y> exp1, Y exp2)
public <C,R> CriteriaBuilder.SimpleCase<C,R> selectCase(Expression<? extends C> expression)
selectCase
in interface CriteriaBuilder
public <C,R> CriteriaBuilder.SimpleCase<C,R> selectCase(Class<R> type, Expression<? extends C> expression)
public <R> CriteriaBuilder.Case<R> selectCase()
selectCase
in interface CriteriaBuilder
public <R> CriteriaBuilder.Case<R> selectCase(Class<R> type)
public <C extends Collection<?>> Expression<Integer> size(C c)
size
in interface CriteriaBuilder
public <C extends Collection<?>> Expression<Integer> size(Expression<C> exp)
size
in interface CriteriaBuilder
public <V,M extends Map<?,V>> Expression<Collection<V>> values(M map)
values
in interface CriteriaBuilder
public <K,M extends Map<K,?>> Expression<Set<K>> keys(M map)
keys
in interface CriteriaBuilder
public <C extends Collection<?>> Predicate isEmpty(Expression<C> collectionExpression)
isEmpty
in interface CriteriaBuilder
public <C extends Collection<?>> Predicate isNotEmpty(Expression<C> collectionExpression)
isNotEmpty
in interface CriteriaBuilder
public <E,C extends Collection<E>> Predicate isMember(E e, Expression<C> collectionExpression)
isMember
in interface CriteriaBuilder
public <E,C extends Collection<E>> Predicate isNotMember(E e, Expression<C> cExpression)
isNotMember
in interface CriteriaBuilder
public <E,C extends Collection<E>> Predicate isMember(Expression<E> elementExpression, Expression<C> collectionExpression)
isMember
in interface CriteriaBuilder
public <E,C extends Collection<E>> Predicate isNotMember(Expression<E> eExpression, Expression<C> cExpression)
isNotMember
in interface CriteriaBuilder
Copyright © 2001-2017 Red Hat, Inc. All Rights Reserved.