public class CriteriaBuilderImpl extends Object implements OpenJPACriteriaBuilder, ExpressionParser
CriteriaBuilder.Case<R>, CriteriaBuilder.Coalesce<T>, CriteriaBuilder.In<T>, CriteriaBuilder.SimpleCase<C,R>, CriteriaBuilder.Trimspec
LANG_CRITERIA
Constructor and Description |
---|
CriteriaBuilderImpl() |
public OpenJPACriteriaBuilder setMetaModel(MetamodelImpl model)
public Metamodel getMetamodel()
OpenJPACriteriaBuilder
getMetamodel
in interface OpenJPACriteriaBuilder
public QueryExpressions eval(Object parsed, ExpressionStoreQuery query, ExpressionFactory factory, ClassMetaData candidate)
ExpressionParser
eval
in interface ExpressionParser
public Value[] eval(String[] vals, ExpressionStoreQuery query, ExpressionFactory factory, ClassMetaData candidate)
ExpressionParser
eval
in interface ExpressionParser
public String getLanguage()
ExpressionParser
getLanguage
in interface ExpressionParser
public <T> OpenJPACriteriaQuery<T> createQuery(Class<T> resultClass)
createQuery
in interface CriteriaBuilder
createQuery
in interface OpenJPACriteriaBuilder
resultClass
- type of the query resultpublic OpenJPACriteriaQuery<Tuple> createTupleQuery()
createTupleQuery
in interface CriteriaBuilder
createTupleQuery
in interface OpenJPACriteriaBuilder
public Object parse(String ql, ExpressionStoreQuery query)
ExpressionParser
parse
in interface ExpressionParser
public void populate(Object parsed, ExpressionStoreQuery query)
ExpressionParser
populate
in interface ExpressionParser
public <N extends Number> Expression<N> abs(Expression<N> x)
abs
in interface CriteriaBuilder
public <Y> Expression<Y> all(Subquery<Y> subquery)
all
in interface CriteriaBuilder
public Predicate and(Predicate... restrictions)
and
in interface CriteriaBuilder
public Predicate and(Expression<Boolean> x, Expression<Boolean> y)
and
in interface CriteriaBuilder
public <Y> Expression<Y> any(Subquery<Y> subquery)
any
in interface CriteriaBuilder
public Order asc(Expression<?> x)
asc
in interface CriteriaBuilder
public <N extends Number> Expression<Double> avg(Expression<N> x)
avg
in interface CriteriaBuilder
public <Y extends Comparable<? super Y>> Predicate between(Expression<? extends Y> v, Expression<? extends Y> x, Expression<? extends Y> y)
between
in interface CriteriaBuilder
public <Y extends Comparable<? super Y>> Predicate between(Expression<? extends Y> v, Y x, Y y)
between
in interface CriteriaBuilder
public <T> CriteriaBuilder.Coalesce<T> coalesce()
coalesce
in interface CriteriaBuilder
public <Y> Expression<Y> coalesce(Expression<? extends Y> x, Expression<? extends Y> y)
coalesce
in interface CriteriaBuilder
public <Y> Expression<Y> coalesce(Expression<? extends Y> x, Y y)
coalesce
in interface CriteriaBuilder
public Expression<String> concat(Expression<String> x, Expression<String> y)
concat
in interface CriteriaBuilder
public Expression<String> concat(Expression<String> x, String y)
concat
in interface CriteriaBuilder
public Expression<String> concat(String x, Expression<String> y)
concat
in interface CriteriaBuilder
public Predicate conjunction()
conjunction
in interface CriteriaBuilder
public Expression<Long> count(Expression<?> x)
count
in interface CriteriaBuilder
public Expression<Long> countDistinct(Expression<?> x)
countDistinct
in interface CriteriaBuilder
public OpenJPACriteriaQuery<Object> createQuery()
OpenJPACriteriaBuilder
CriteriaQuery
object.createQuery
in interface CriteriaBuilder
createQuery
in interface OpenJPACriteriaBuilder
public Expression<Date> currentDate()
currentDate
in interface CriteriaBuilder
public Expression<Time> currentTime()
currentTime
in interface CriteriaBuilder
public Expression<Timestamp> currentTimestamp()
currentTimestamp
in interface CriteriaBuilder
public Order desc(Expression<?> x)
desc
in interface CriteriaBuilder
public <N extends Number> Expression<N> diff(Expression<? extends N> x, Expression<? extends N> y)
diff
in interface CriteriaBuilder
public <N extends Number> Expression<N> diff(Expression<? extends N> x, N y)
diff
in interface CriteriaBuilder
public <N extends Number> Expression<N> diff(N x, Expression<? extends N> y)
diff
in interface CriteriaBuilder
public Predicate disjunction()
disjunction
in interface CriteriaBuilder
public Predicate equal(Expression<?> x, Expression<?> y)
equal
in interface CriteriaBuilder
public Predicate equal(Expression<?> x, Object y)
equal
in interface CriteriaBuilder
public Predicate exists(Subquery<?> subquery)
exists
in interface CriteriaBuilder
public <T> Expression<T> function(String name, Class<T> type, Expression<?>... args)
function
in interface CriteriaBuilder
public Predicate ge(Expression<? extends Number> x, Expression<? extends Number> y)
ge
in interface CriteriaBuilder
public Predicate ge(Expression<? extends Number> x, Number y)
ge
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 greaterThan(Expression<? extends Y> x, Y y)
greaterThan
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 greaterThanOrEqualTo(Expression<? extends Y> x, Y y)
greaterThanOrEqualTo
in interface CriteriaBuilder
public <X extends Comparable<? super X>> Expression<X> greatest(Expression<X> x)
greatest
in interface CriteriaBuilder
public Predicate gt(Expression<? extends Number> x, Expression<? extends Number> y)
gt
in interface CriteriaBuilder
public Predicate gt(Expression<? extends Number> x, Number y)
gt
in interface CriteriaBuilder
public <T> CriteriaBuilder.In<T> in(Expression<? extends T> expression)
in
in interface CriteriaBuilder
public <C extends Collection<?>> Predicate isEmpty(Expression<C> collection)
isEmpty
in interface CriteriaBuilder
public Predicate isFalse(Expression<Boolean> x)
isFalse
in interface CriteriaBuilder
public <E,C extends Collection<E>> Predicate isMember(E e, Expression<C> c)
isMember
in interface CriteriaBuilder
public <E,C extends Collection<E>> Predicate isMember(Expression<E> e, Expression<C> c)
isMember
in interface CriteriaBuilder
public <C extends Collection<?>> Predicate isNotEmpty(Expression<C> collection)
isNotEmpty
in interface CriteriaBuilder
public <E,C extends Collection<E>> Predicate isNotMember(E e, Expression<C> c)
isNotMember
in interface CriteriaBuilder
public <E,C extends Collection<E>> Predicate isNotMember(Expression<E> e, Expression<C> c)
isNotMember
in interface CriteriaBuilder
public Predicate isTrue(Expression<Boolean> x)
isTrue
in interface CriteriaBuilder
public <K,M extends Map<K,?>> Expression<Set<K>> keys(M map)
keys
in interface CriteriaBuilder
public Predicate le(Expression<? extends Number> x, Expression<? extends Number> y)
le
in interface CriteriaBuilder
public Predicate le(Expression<? extends Number> x, Number y)
le
in interface CriteriaBuilder
public <X extends Comparable<? super X>> Expression<X> least(Expression<X> x)
least
in interface CriteriaBuilder
public Expression<Integer> length(Expression<String> x)
length
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 lessThan(Expression<? extends Y> x, Y y)
lessThan
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 lessThanOrEqualTo(Expression<? extends Y> x, Y y)
lessThanOrEqualTo
in interface CriteriaBuilder
public Predicate like(Expression<String> x, Expression<String> pattern)
like
in interface CriteriaBuilder
public Predicate like(Expression<String> x, String pattern)
like
in interface CriteriaBuilder
public Predicate like(Expression<String> x, Expression<String> pattern, Expression<Character> escapeChar)
like
in interface CriteriaBuilder
public Predicate like(Expression<String> x, Expression<String> pattern, char escapeChar)
like
in interface CriteriaBuilder
public Predicate like(Expression<String> x, String pattern, Expression<Character> escapeChar)
like
in interface CriteriaBuilder
public Predicate like(Expression<String> x, String pattern, char escapeChar)
like
in interface CriteriaBuilder
public <T> Expression<T> literal(T value)
literal
in interface CriteriaBuilder
public Expression<Integer> locate(Expression<String> x, Expression<String> pattern)
locate
in interface CriteriaBuilder
public Expression<Integer> locate(Expression<String> x, String pattern)
locate
in interface CriteriaBuilder
public Expression<Integer> locate(Expression<String> x, Expression<String> pattern, Expression<Integer> from)
locate
in interface CriteriaBuilder
public Expression<Integer> locate(Expression<String> x, String pattern, int from)
locate
in interface CriteriaBuilder
public Expression<String> lower(Expression<String> x)
lower
in interface CriteriaBuilder
public Predicate lt(Expression<? extends Number> x, Expression<? extends Number> y)
lt
in interface CriteriaBuilder
public Predicate lt(Expression<? extends Number> x, Number y)
lt
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 Expression<Integer> mod(Expression<Integer> x, Expression<Integer> y)
mod
in interface CriteriaBuilder
public Expression<Integer> mod(Expression<Integer> x, Integer y)
mod
in interface CriteriaBuilder
public Expression<Integer> mod(Integer x, Expression<Integer> y)
mod
in interface CriteriaBuilder
public <N extends Number> Expression<N> neg(Expression<N> x)
neg
in interface CriteriaBuilder
public Predicate not(Expression<Boolean> restriction)
not
in interface CriteriaBuilder
public Predicate notEqual(Expression<?> x, Expression<?> y)
notEqual
in interface CriteriaBuilder
public Predicate notEqual(Expression<?> x, Object y)
notEqual
in interface CriteriaBuilder
public Predicate notLike(Expression<String> x, Expression<String> pattern)
notLike
in interface CriteriaBuilder
public Predicate notLike(Expression<String> x, String pattern)
notLike
in interface CriteriaBuilder
public Predicate notLike(Expression<String> x, Expression<String> pattern, Expression<Character> escapeChar)
notLike
in interface CriteriaBuilder
public Predicate notLike(Expression<String> x, Expression<String> pattern, char escapeChar)
notLike
in interface CriteriaBuilder
public Predicate notLike(Expression<String> x, String pattern, Expression<Character> escapeChar)
notLike
in interface CriteriaBuilder
public Predicate notLike(Expression<String> x, String pattern, char escapeChar)
notLike
in interface CriteriaBuilder
public <Y> Expression<Y> nullif(Expression<Y> x, Expression<?> y)
nullif
in interface CriteriaBuilder
public <Y> Expression<Y> nullif(Expression<Y> x, Y y)
nullif
in interface CriteriaBuilder
public Predicate or(Predicate... restrictions)
or
in interface CriteriaBuilder
public Predicate or(Expression<Boolean> x, Expression<Boolean> y)
or
in interface CriteriaBuilder
public <T> ParameterExpression<T> parameter(Class<T> paramClass)
parameter
in interface CriteriaBuilder
ParameterExpressionImpl#assignAutoName(String)
public <T> ParameterExpression<T> parameter(Class<T> paramClass, String name)
parameter
in interface CriteriaBuilder
public <N extends Number> Expression<N> prod(Expression<? extends N> x, Expression<? extends N> y)
prod
in interface CriteriaBuilder
public <N extends Number> Expression<N> prod(Expression<? extends N> x, N y)
prod
in interface CriteriaBuilder
public <N extends Number> Expression<N> prod(N x, Expression<? extends N> y)
prod
in interface CriteriaBuilder
public Expression<Number> quot(Expression<? extends Number> x, Expression<? extends Number> y)
quot
in interface CriteriaBuilder
public Expression<Number> quot(Expression<? extends Number> x, Number y)
quot
in interface CriteriaBuilder
public Expression<Number> quot(Number x, Expression<? extends Number> y)
quot
in interface CriteriaBuilder
public <Y> CompoundSelection<Y> construct(Class<Y> result, Selection<?>... selections)
construct
in interface CriteriaBuilder
result
- class whose instance is to be constructedselections
- arguments to the constructorpublic <R> CriteriaBuilder.Case<R> selectCase()
selectCase
in interface CriteriaBuilder
public <C,R> CriteriaBuilder.SimpleCase<C,R> selectCase(Expression<? extends C> expression)
selectCase
in interface CriteriaBuilder
public <C extends Collection<?>> Expression<Integer> size(C collection)
size
in interface CriteriaBuilder
public <C extends Collection<?>> Expression<Integer> size(Expression<C> collection)
size
in interface CriteriaBuilder
public <Y> Expression<Y> some(Subquery<Y> subquery)
some
in interface CriteriaBuilder
public Expression<Double> sqrt(Expression<? extends Number> x)
sqrt
in interface CriteriaBuilder
public Expression<String> substring(Expression<String> x, Expression<Integer> from)
substring
in interface CriteriaBuilder
public Expression<String> substring(Expression<String> x, int from)
substring
in interface CriteriaBuilder
public Expression<String> substring(Expression<String> x, Expression<Integer> from, Expression<Integer> len)
substring
in interface CriteriaBuilder
public Expression<String> substring(Expression<String> x, int from, int len)
substring
in interface CriteriaBuilder
public <N extends Number> Expression<N> sum(Expression<N> x)
sum
in interface CriteriaBuilder
public <N extends Number> Expression<N> sum(Expression<? extends N> x, Expression<? extends N> y)
sum
in interface CriteriaBuilder
public <N extends Number> Expression<N> sum(Expression<? extends N> x, N y)
sum
in interface CriteriaBuilder
public <N extends Number> Expression<N> sum(N x, Expression<? extends N> y)
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 Expression<BigDecimal> toBigDecimal(Expression<? extends Number> number)
toBigDecimal
in interface CriteriaBuilder
public Expression<BigInteger> toBigInteger(Expression<? extends Number> number)
toBigInteger
in interface CriteriaBuilder
public Expression<Double> toDouble(Expression<? extends Number> number)
toDouble
in interface CriteriaBuilder
public Expression<Float> toFloat(Expression<? extends Number> number)
toFloat
in interface CriteriaBuilder
public Expression<Integer> toInteger(Expression<? extends Number> number)
toInteger
in interface CriteriaBuilder
public Expression<Long> toLong(Expression<? extends Number> number)
toLong
in interface CriteriaBuilder
public Expression<String> toString(Expression<Character> character)
toString
in interface CriteriaBuilder
public Expression<String> trim(Expression<String> x)
trim
in interface CriteriaBuilder
public Expression<String> trim(CriteriaBuilder.Trimspec ts, Expression<String> x)
trim
in interface CriteriaBuilder
public Expression<String> trim(Expression<Character> t, Expression<String> x)
trim
in interface CriteriaBuilder
public Expression<String> trim(char t, Expression<String> x)
trim
in interface CriteriaBuilder
public Expression<String> trim(CriteriaBuilder.Trimspec ts, Expression<Character> t, Expression<String> x)
trim
in interface CriteriaBuilder
public Expression<String> trim(CriteriaBuilder.Trimspec ts, char t, Expression<String> x)
trim
in interface CriteriaBuilder
public Expression<String> upper(Expression<String> x)
upper
in interface CriteriaBuilder
public <V,M extends Map<?,V>> Expression<Collection<V>> values(M map)
values
in interface CriteriaBuilder
public CompoundSelection<Object[]> array(Selection<?>... terms)
array
in interface CriteriaBuilder
public Predicate isNotNull(Expression<?> x)
isNotNull
in interface CriteriaBuilder
public Predicate isNull(Expression<?> x)
isNull
in interface CriteriaBuilder
public <T> Expression<T> nullLiteral(Class<T> t)
nullLiteral
in interface CriteriaBuilder
public CompoundSelection<Tuple> tuple(Selection<?>... selections)
tuple
in interface CriteriaBuilder
selections
- selection itemsIllegalArgumentException
- if an argument is a tuple- or
array-valued selection itempublic <T> Predicate qbe(From<?,T> from, T example, ComparisonStyle style, Attribute<?,?>... excludes)
qbe
in interface OpenJPACriteriaBuilder
example
- an instance of an entity classstyle
- specifies various aspects of comparison such as whether
non-null attribute values be included, how string-valued attribute be
compared, whether the individual attribute based predicates are ANDed
or ORed etc.excludes
- list of attributes that are excluded from comparison.public <T> Predicate qbe(From<?,T> from, T example, ComparisonStyle style)
OpenJPACriteriaBuilder
qbe
in interface OpenJPACriteriaBuilder
public <T> Predicate qbe(From<?,T> from, T example, Attribute<?,?>... excludes)
OpenJPACriteriaBuilder
qbe
in interface OpenJPACriteriaBuilder
public <T> Predicate qbe(From<?,T> from, T example)
OpenJPACriteriaBuilder
qbe
in interface OpenJPACriteriaBuilder
public ComparisonStyle qbeStyle()
qbeStyle
in interface OpenJPACriteriaBuilder
Copyright © 2006–2017 Apache Software Foundation. All rights reserved.