BrightSide Workbench Full Report + Source Code
JpaCriteria.java
Go to the documentation of this file.
1 /*
2  * TurrĂ³ i Cutiller Foundation. License notice.
3  * Copyright (C) 2020 Lluis TurrĂ³ Cutiller <http://www.turro.org/>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Affero General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Affero General Public License for more details.
14  *
15  * You should have received a copy of the GNU Affero General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 package org.turro.jpa.query;
20 
21 import java.math.BigDecimal;
22 import java.math.BigInteger;
23 import java.sql.Date;
24 import java.sql.Time;
25 import java.sql.Timestamp;
26 import java.util.Collection;
27 import java.util.Map;
28 import java.util.Set;
29 import javax.persistence.Tuple;
30 import javax.persistence.criteria.CollectionJoin;
31 import javax.persistence.criteria.CompoundSelection;
32 import javax.persistence.criteria.CriteriaBuilder;
33 import javax.persistence.criteria.Expression;
34 import javax.persistence.criteria.Join;
35 import javax.persistence.criteria.ListJoin;
36 import javax.persistence.criteria.MapJoin;
37 import javax.persistence.criteria.Order;
38 import javax.persistence.criteria.ParameterExpression;
39 import javax.persistence.criteria.Path;
40 import javax.persistence.criteria.Predicate;
41 import javax.persistence.criteria.Root;
42 import javax.persistence.criteria.Selection;
43 import javax.persistence.criteria.SetJoin;
44 import javax.persistence.criteria.Subquery;
45 import org.turro.jpa.Dao;
46 import org.turro.jpa.DaoManager;
47 
52 public class JpaCriteria {
53 
54  private final Dao dao;
55  private CriteriaBuilder criteriaBuilder;
56 
57  public JpaCriteria(Dao dao) {
58  this.dao = dao;
59  initCriteria();
60  }
61 
62  public <T> JpaQuery<T> query(Class<T> javaClass) {
63  return new JpaQuery<>(javaClass, this);
64  }
65 
66  protected CriteriaBuilder builder() {
67  return criteriaBuilder;
68  }
69 
70  private void initCriteria() {
71  try(DaoManager manager = new DaoManager(dao)) {
72  criteriaBuilder = manager.getManager().getCriteriaBuilder();
73  }
74  }
75 
76  /* Delegate criteria */
77 
78  public <T> JpaCriteriaUpdate<T> createCriteriaUpdate(Class<T> targetEntity) {
79  return new JpaCriteriaUpdate<>(targetEntity, this);
80  }
81 
82  public <T> JpaCriteriaDelete<T> createCriteriaDelete(Class<T> targetEntity) {
83  return new JpaCriteriaDelete<>(targetEntity, this);
84  }
85 
86  public <Y> CompoundSelection<Y> construct(Class<Y> resultClass, Selection<?>... selections) {
87  return criteriaBuilder.construct(resultClass, selections);
88  }
89 
90  public CompoundSelection<Tuple> tuple(Selection<?>... selections) {
91  return criteriaBuilder.tuple(selections);
92  }
93 
94  public CompoundSelection<Object[]> array(Selection<?>... selections) {
95  return criteriaBuilder.array(selections);
96  }
97 
98  public Order asc(Expression<?> x) {
99  return criteriaBuilder.asc(x);
100  }
101 
102  public Order desc(Expression<?> x) {
103  return criteriaBuilder.desc(x);
104  }
105 
106  public <N extends Number> Expression<Double> avg(Expression<N> x) {
107  return criteriaBuilder.avg(x);
108  }
109 
110  public <N extends Number> Expression<N> sum(Expression<N> x) {
111  return criteriaBuilder.sum(x);
112  }
113 
114  public Expression<Long> sumAsLong(Expression<Integer> x) {
115  return criteriaBuilder.sumAsLong(x);
116  }
117 
118  public Expression<Double> sumAsDouble(Expression<Float> x) {
119  return criteriaBuilder.sumAsDouble(x);
120  }
121 
122  public <N extends Number> Expression<N> max(Expression<N> x) {
123  return criteriaBuilder.max(x);
124  }
125 
126  public <N extends Number> Expression<N> min(Expression<N> x) {
127  return criteriaBuilder.min(x);
128  }
129 
130  public <X extends Comparable<? super X>> Expression<X> greatest(Expression<X> x) {
131  return criteriaBuilder.greatest(x);
132  }
133 
134  public <X extends Comparable<? super X>> Expression<X> least(Expression<X> x) {
135  return criteriaBuilder.least(x);
136  }
137 
138  public Expression<Long> count(Expression<?> x) {
139  return criteriaBuilder.count(x);
140  }
141 
142  public Expression<Long> countDistinct(Expression<?> x) {
143  return criteriaBuilder.countDistinct(x);
144  }
145 
146  public Predicate exists(Subquery<?> subquery) {
147  return criteriaBuilder.exists(subquery);
148  }
149 
150  public <Y> Expression<Y> all(Subquery<Y> subquery) {
151  return criteriaBuilder.all(subquery);
152  }
153 
154  public <Y> Expression<Y> some(Subquery<Y> subquery) {
155  return criteriaBuilder.some(subquery);
156  }
157 
158  public <Y> Expression<Y> any(Subquery<Y> subquery) {
159  return criteriaBuilder.any(subquery);
160  }
161 
162  public Predicate and(Expression<Boolean> x, Expression<Boolean> y) {
163  return criteriaBuilder.and(x, y);
164  }
165 
166  public Predicate and(Predicate... restrictions) {
167  return criteriaBuilder.and(restrictions);
168  }
169 
170  public Predicate or(Expression<Boolean> x, Expression<Boolean> y) {
171  return criteriaBuilder.or(x, y);
172  }
173 
174  public Predicate or(Predicate... restrictions) {
175  return criteriaBuilder.or(restrictions);
176  }
177 
178  public Predicate not(Expression<Boolean> restriction) {
179  return criteriaBuilder.not(restriction);
180  }
181 
182  public Predicate conjunction() {
183  return criteriaBuilder.conjunction();
184  }
185 
186  public Predicate disjunction() {
187  return criteriaBuilder.disjunction();
188  }
189 
190  public Predicate isTrue(Expression<Boolean> x) {
191  return criteriaBuilder.isTrue(x);
192  }
193 
194  public Predicate isFalse(Expression<Boolean> x) {
195  return criteriaBuilder.isFalse(x);
196  }
197 
198  public Predicate isNull(Expression<?> x) {
199  return criteriaBuilder.isNull(x);
200  }
201 
202  public Predicate isNotNull(Expression<?> x) {
203  return criteriaBuilder.isNotNull(x);
204  }
205 
206  public Predicate equal(Expression<?> x, Expression<?> y) {
207  return criteriaBuilder.equal(x, y);
208  }
209 
210  public Predicate equal(Expression<?> x, Object y) {
211  return criteriaBuilder.equal(x, y);
212  }
213 
214  public Predicate notEqual(Expression<?> x, Expression<?> y) {
215  return criteriaBuilder.notEqual(x, y);
216  }
217 
218  public Predicate notEqual(Expression<?> x, Object y) {
219  return criteriaBuilder.notEqual(x, y);
220  }
221 
222  public <Y extends Comparable<? super Y>> Predicate greaterThan(Expression<? extends Y> x, Expression<? extends Y> y) {
223  return criteriaBuilder.greaterThan(x, y);
224  }
225 
226  public <Y extends Comparable<? super Y>> Predicate greaterThan(Expression<? extends Y> x, Y y) {
227  return criteriaBuilder.greaterThan(x, y);
228  }
229 
230  public <Y extends Comparable<? super Y>> Predicate greaterThanOrEqualTo(Expression<? extends Y> x, Expression<? extends Y> y) {
231  return criteriaBuilder.greaterThanOrEqualTo(x, y);
232  }
233 
234  public <Y extends Comparable<? super Y>> Predicate greaterThanOrEqualTo(Expression<? extends Y> x, Y y) {
235  return criteriaBuilder.greaterThanOrEqualTo(x, y);
236  }
237 
238  public <Y extends Comparable<? super Y>> Predicate lessThan(Expression<? extends Y> x, Expression<? extends Y> y) {
239  return criteriaBuilder.lessThan(x, y);
240  }
241 
242  public <Y extends Comparable<? super Y>> Predicate lessThan(Expression<? extends Y> x, Y y) {
243  return criteriaBuilder.lessThan(x, y);
244  }
245 
246  public <Y extends Comparable<? super Y>> Predicate lessThanOrEqualTo(Expression<? extends Y> x, Expression<? extends Y> y) {
247  return criteriaBuilder.lessThanOrEqualTo(x, y);
248  }
249 
250  public <Y extends Comparable<? super Y>> Predicate lessThanOrEqualTo(Expression<? extends Y> x, Y y) {
251  return criteriaBuilder.lessThanOrEqualTo(x, y);
252  }
253 
254  public <Y extends Comparable<? super Y>> Predicate between(Expression<? extends Y> v, Expression<? extends Y> x, Expression<? extends Y> y) {
255  return criteriaBuilder.between(v, x, y);
256  }
257 
258  public <Y extends Comparable<? super Y>> Predicate between(Expression<? extends Y> v, Y x, Y y) {
259  return criteriaBuilder.between(v, x, y);
260  }
261 
262  public Predicate gt(Expression<? extends Number> x, Expression<? extends Number> y) {
263  return criteriaBuilder.gt(x, y);
264  }
265 
266  public Predicate gt(Expression<? extends Number> x, Number y) {
267  return criteriaBuilder.gt(x, y);
268  }
269 
270  public Predicate ge(Expression<? extends Number> x, Expression<? extends Number> y) {
271  return criteriaBuilder.ge(x, y);
272  }
273 
274  public Predicate ge(Expression<? extends Number> x, Number y) {
275  return criteriaBuilder.ge(x, y);
276  }
277 
278  public Predicate lt(Expression<? extends Number> x, Expression<? extends Number> y) {
279  return criteriaBuilder.lt(x, y);
280  }
281 
282  public Predicate lt(Expression<? extends Number> x, Number y) {
283  return criteriaBuilder.lt(x, y);
284  }
285 
286  public Predicate le(Expression<? extends Number> x, Expression<? extends Number> y) {
287  return criteriaBuilder.le(x, y);
288  }
289 
290  public Predicate le(Expression<? extends Number> x, Number y) {
291  return criteriaBuilder.le(x, y);
292  }
293 
294  public <N extends Number> Expression<N> neg(Expression<N> x) {
295  return criteriaBuilder.neg(x);
296  }
297 
298  public <N extends Number> Expression<N> abs(Expression<N> x) {
299  return criteriaBuilder.abs(x);
300  }
301 
302  public <N extends Number> Expression<N> sum(Expression<? extends N> x, Expression<? extends N> y) {
303  return criteriaBuilder.sum(x, y);
304  }
305 
306  public <N extends Number> Expression<N> sum(Expression<? extends N> x, N y) {
307  return criteriaBuilder.sum(x, y);
308  }
309 
310  public <N extends Number> Expression<N> sum(N x, Expression<? extends N> y) {
311  return criteriaBuilder.sum(x, y);
312  }
313 
314  public <N extends Number> Expression<N> prod(Expression<? extends N> x, Expression<? extends N> y) {
315  return criteriaBuilder.prod(x, y);
316  }
317 
318  public <N extends Number> Expression<N> prod(Expression<? extends N> x, N y) {
319  return criteriaBuilder.prod(x, y);
320  }
321 
322  public <N extends Number> Expression<N> prod(N x, Expression<? extends N> y) {
323  return criteriaBuilder.prod(x, y);
324  }
325 
326  public <N extends Number> Expression<N> diff(Expression<? extends N> x, Expression<? extends N> y) {
327  return criteriaBuilder.diff(x, y);
328  }
329 
330  public <N extends Number> Expression<N> diff(Expression<? extends N> x, N y) {
331  return criteriaBuilder.diff(x, y);
332  }
333 
334  public <N extends Number> Expression<N> diff(N x, Expression<? extends N> y) {
335  return criteriaBuilder.diff(x, y);
336  }
337 
338  public Expression<Number> quot(Expression<? extends Number> x, Expression<? extends Number> y) {
339  return criteriaBuilder.quot(x, y);
340  }
341 
342  public Expression<Number> quot(Expression<? extends Number> x, Number y) {
343  return criteriaBuilder.quot(x, y);
344  }
345 
346  public Expression<Number> quot(Number x, Expression<? extends Number> y) {
347  return criteriaBuilder.quot(x, y);
348  }
349 
350  public Expression<Integer> mod(Expression<Integer> x, Expression<Integer> y) {
351  return criteriaBuilder.mod(x, y);
352  }
353 
354  public Expression<Integer> mod(Expression<Integer> x, Integer y) {
355  return criteriaBuilder.mod(x, y);
356  }
357 
358  public Expression<Integer> mod(Integer x, Expression<Integer> y) {
359  return criteriaBuilder.mod(x, y);
360  }
361 
362  public Expression<Double> sqrt(Expression<? extends Number> x) {
363  return criteriaBuilder.sqrt(x);
364  }
365 
366  public Expression<Long> toLong(Expression<? extends Number> number) {
367  return criteriaBuilder.toLong(number);
368  }
369 
370  public Expression<Integer> toInteger(Expression<? extends Number> number) {
371  return criteriaBuilder.toInteger(number);
372  }
373 
374  public Expression<Float> toFloat(Expression<? extends Number> number) {
375  return criteriaBuilder.toFloat(number);
376  }
377 
378  public Expression<Double> toDouble(Expression<? extends Number> number) {
379  return criteriaBuilder.toDouble(number);
380  }
381 
382  public Expression<BigDecimal> toBigDecimal(Expression<? extends Number> number) {
383  return criteriaBuilder.toBigDecimal(number);
384  }
385 
386  public Expression<BigInteger> toBigInteger(Expression<? extends Number> number) {
387  return criteriaBuilder.toBigInteger(number);
388  }
389 
390  public Expression<String> toString(Expression<Character> character) {
391  return criteriaBuilder.toString(character);
392  }
393 
394  public <T> Expression<T> literal(T value) {
395  return criteriaBuilder.literal(value);
396  }
397 
398  public <T> Expression<T> nullLiteral(Class<T> resultClass) {
399  return criteriaBuilder.nullLiteral(resultClass);
400  }
401 
402  public <T> ParameterExpression<T> parameter(Class<T> paramClass) {
403  return criteriaBuilder.parameter(paramClass);
404  }
405 
406  public <T> ParameterExpression<T> parameter(Class<T> paramClass, String name) {
407  return criteriaBuilder.parameter(paramClass, name);
408  }
409 
410  public <C extends Collection<?>> Predicate isEmpty(Expression<C> collection) {
411  return criteriaBuilder.isEmpty(collection);
412  }
413 
414  public <C extends Collection<?>> Predicate isNotEmpty(Expression<C> collection) {
415  return criteriaBuilder.isNotEmpty(collection);
416  }
417 
418  public <C extends Collection<?>> Expression<Integer> size(Expression<C> collection) {
419  return criteriaBuilder.size(collection);
420  }
421 
422  public <C extends Collection<?>> Expression<Integer> size(C collection) {
423  return criteriaBuilder.size(collection);
424  }
425 
426  public <E, C extends Collection<E>> Predicate isMember(Expression<E> elem, Expression<C> collection) {
427  return criteriaBuilder.isMember(elem, collection);
428  }
429 
430  public <E, C extends Collection<E>> Predicate isMember(E elem, Expression<C> collection) {
431  return criteriaBuilder.isMember(elem, collection);
432  }
433 
434  public <E, C extends Collection<E>> Predicate isNotMember(Expression<E> elem, Expression<C> collection) {
435  return criteriaBuilder.isNotMember(elem, collection);
436  }
437 
438  public <E, C extends Collection<E>> Predicate isNotMember(E elem, Expression<C> collection) {
439  return criteriaBuilder.isNotMember(elem, collection);
440  }
441 
442  public <V, M extends Map<?, V>> Expression<Collection<V>> values(M map) {
443  return criteriaBuilder.values(map);
444  }
445 
446  public <K, M extends Map<K, ?>> Expression<Set<K>> keys(M map) {
447  return criteriaBuilder.keys(map);
448  }
449 
450  public Predicate like(Expression<String> x, Expression<String> pattern) {
451  return criteriaBuilder.like(x, pattern);
452  }
453 
454  public Predicate like(Expression<String> x, String pattern) {
455  return criteriaBuilder.like(x, pattern);
456  }
457 
458  public Predicate like(Expression<String> x, Expression<String> pattern, Expression<Character> escapeChar) {
459  return criteriaBuilder.like(x, pattern, escapeChar);
460  }
461 
462  public Predicate like(Expression<String> x, Expression<String> pattern, char escapeChar) {
463  return criteriaBuilder.like(x, pattern, escapeChar);
464  }
465 
466  public Predicate like(Expression<String> x, String pattern, Expression<Character> escapeChar) {
467  return criteriaBuilder.like(x, pattern, escapeChar);
468  }
469 
470  public Predicate like(Expression<String> x, String pattern, char escapeChar) {
471  return criteriaBuilder.like(x, pattern, escapeChar);
472  }
473 
474  public Predicate notLike(Expression<String> x, Expression<String> pattern) {
475  return criteriaBuilder.notLike(x, pattern);
476  }
477 
478  public Predicate notLike(Expression<String> x, String pattern) {
479  return criteriaBuilder.notLike(x, pattern);
480  }
481 
482  public Predicate notLike(Expression<String> x, Expression<String> pattern, Expression<Character> escapeChar) {
483  return criteriaBuilder.notLike(x, pattern, escapeChar);
484  }
485 
486  public Predicate notLike(Expression<String> x, Expression<String> pattern, char escapeChar) {
487  return criteriaBuilder.notLike(x, pattern, escapeChar);
488  }
489 
490  public Predicate notLike(Expression<String> x, String pattern, Expression<Character> escapeChar) {
491  return criteriaBuilder.notLike(x, pattern, escapeChar);
492  }
493 
494  public Predicate notLike(Expression<String> x, String pattern, char escapeChar) {
495  return criteriaBuilder.notLike(x, pattern, escapeChar);
496  }
497 
498  public Expression<String> concat(Expression<String> x, Expression<String> y) {
499  return criteriaBuilder.concat(x, y);
500  }
501 
502  public Expression<String> concat(Expression<String> x, String y) {
503  return criteriaBuilder.concat(x, y);
504  }
505 
506  public Expression<String> concat(String x, Expression<String> y) {
507  return criteriaBuilder.concat(x, y);
508  }
509 
510  public Expression<String> substring(Expression<String> x, Expression<Integer> from) {
511  return criteriaBuilder.substring(x, from);
512  }
513 
514  public Expression<String> substring(Expression<String> x, int from) {
515  return criteriaBuilder.substring(x, from);
516  }
517 
518  public Expression<String> substring(Expression<String> x, Expression<Integer> from, Expression<Integer> len) {
519  return criteriaBuilder.substring(x, from, len);
520  }
521 
522  public Expression<String> substring(Expression<String> x, int from, int len) {
523  return criteriaBuilder.substring(x, from, len);
524  }
525 
526  public Expression<String> trim(Expression<String> x) {
527  return criteriaBuilder.trim(x);
528  }
529 
530  public Expression<String> trim(CriteriaBuilder.Trimspec ts, Expression<String> x) {
531  return criteriaBuilder.trim(ts, x);
532  }
533 
534  public Expression<String> trim(Expression<Character> t, Expression<String> x) {
535  return criteriaBuilder.trim(t, x);
536  }
537 
538  public Expression<String> trim(CriteriaBuilder.Trimspec ts, Expression<Character> t, Expression<String> x) {
539  return criteriaBuilder.trim(ts, t, x);
540  }
541 
542  public Expression<String> trim(char t, Expression<String> x) {
543  return criteriaBuilder.trim(t, x);
544  }
545 
546  public Expression<String> trim(CriteriaBuilder.Trimspec ts, char t, Expression<String> x) {
547  return criteriaBuilder.trim(ts, t, x);
548  }
549 
550  public Expression<String> lower(Expression<String> x) {
551  return criteriaBuilder.lower(x);
552  }
553 
554  public Expression<String> upper(Expression<String> x) {
555  return criteriaBuilder.upper(x);
556  }
557 
558  public Expression<Integer> length(Expression<String> x) {
559  return criteriaBuilder.length(x);
560  }
561 
562  public Expression<Integer> locate(Expression<String> x, Expression<String> pattern) {
563  return criteriaBuilder.locate(x, pattern);
564  }
565 
566  public Expression<Integer> locate(Expression<String> x, String pattern) {
567  return criteriaBuilder.locate(x, pattern);
568  }
569 
570  public Expression<Integer> locate(Expression<String> x, Expression<String> pattern, Expression<Integer> from) {
571  return criteriaBuilder.locate(x, pattern, from);
572  }
573 
574  public Expression<Integer> locate(Expression<String> x, String pattern, int from) {
575  return criteriaBuilder.locate(x, pattern, from);
576  }
577 
578  public Expression<Date> currentDate() {
579  return criteriaBuilder.currentDate();
580  }
581 
582  public Expression<Timestamp> currentTimestamp() {
583  return criteriaBuilder.currentTimestamp();
584  }
585 
586  public Expression<Time> currentTime() {
587  return criteriaBuilder.currentTime();
588  }
589 
590  public <T> CriteriaBuilder.In<T> in(Expression<? extends T> expression) {
591  return criteriaBuilder.in(expression);
592  }
593 
594  public <Y> Expression<Y> coalesce(Expression<? extends Y> x, Expression<? extends Y> y) {
595  return criteriaBuilder.coalesce(x, y);
596  }
597 
598  public <Y> Expression<Y> coalesce(Expression<? extends Y> x, Y y) {
599  return criteriaBuilder.coalesce(x, y);
600  }
601 
602  public <Y> Expression<Y> nullif(Expression<Y> x, Expression<?> y) {
603  return criteriaBuilder.nullif(x, y);
604  }
605 
606  public <Y> Expression<Y> nullif(Expression<Y> x, Y y) {
607  return criteriaBuilder.nullif(x, y);
608  }
609 
610  public <T> CriteriaBuilder.Coalesce<T> coalesce() {
611  return criteriaBuilder.coalesce();
612  }
613 
614  public <C, R> CriteriaBuilder.SimpleCase<C, R> selectCase(Expression<? extends C> expression) {
615  return criteriaBuilder.selectCase(expression);
616  }
617 
618  public <R> CriteriaBuilder.Case<R> selectCase() {
619  return criteriaBuilder.selectCase();
620  }
621 
622  public <T> Expression<T> function(String name, Class<T> type, Expression<?>... args) {
623  return criteriaBuilder.function(name, type, args);
624  }
625 
626  public <X, T, V extends T> Join<X, V> treat(Join<X, T> join, Class<V> type) {
627  return criteriaBuilder.treat(join, type);
628  }
629 
630  public <X, T, E extends T> CollectionJoin<X, E> treat(CollectionJoin<X, T> join, Class<E> type) {
631  return criteriaBuilder.treat(join, type);
632  }
633 
634  public <X, T, E extends T> SetJoin<X, E> treat(SetJoin<X, T> join, Class<E> type) {
635  return criteriaBuilder.treat(join, type);
636  }
637 
638  public <X, T, E extends T> ListJoin<X, E> treat(ListJoin<X, T> join, Class<E> type) {
639  return criteriaBuilder.treat(join, type);
640  }
641 
642  public <X, K, T, V extends T> MapJoin<X, K, V> treat(MapJoin<X, K, T> join, Class<V> type) {
643  return criteriaBuilder.treat(join, type);
644  }
645 
646  public <X, T extends X> Path<T> treat(Path<X> path, Class<T> type) {
647  return criteriaBuilder.treat(path, type);
648  }
649 
650  public <X, T extends X> Root<T> treat(Root<X> root, Class<T> type) {
651  return criteriaBuilder.treat(root, type);
652  }
653 
654 }
Expression< String > concat(Expression< String > x, Expression< String > y)
Expression< Number > quot(Expression<? extends Number > x, Number y)
CompoundSelection< Object[]> array(Selection<?>... selections)
Expression< String > upper(Expression< String > x)
Predicate lt(Expression<? extends Number > x, Number y)
Predicate like(Expression< String > x, Expression< String > pattern, Expression< Character > escapeChar)
Expression< Long > toLong(Expression<? extends Number > number)
Expression< String > concat(String x, Expression< String > y)
Expression< Double > toDouble(Expression<? extends Number > number)
Expression< String > trim(CriteriaBuilder.Trimspec ts, char t, Expression< String > x)
Predicate isNull(Expression<?> x)
Predicate notLike(Expression< String > x, Expression< String > pattern)
Expression< Integer > locate(Expression< String > x, String pattern)
Predicate ge(Expression<? extends Number > x, Number y)
Expression< Number > quot(Number x, Expression<? extends Number > y)
Expression< String > concat(Expression< String > x, String y)
Expression< String > trim(CriteriaBuilder.Trimspec ts, Expression< Character > t, Expression< String > x)
Expression< Timestamp > currentTimestamp()
Predicate isTrue(Expression< Boolean > x)
Predicate like(Expression< String > x, Expression< String > pattern, char escapeChar)
Predicate or(Predicate... restrictions)
Expression< String > trim(Expression< String > x)
Order asc(Expression<?> x)
Expression< String > trim(CriteriaBuilder.Trimspec ts, Expression< String > x)
CompoundSelection< Tuple > tuple(Selection<?>... selections)
Expression< Time > currentTime()
Expression< String > substring(Expression< String > x, Expression< Integer > from)
Predicate gt(Expression<? extends Number > x, Number y)
Expression< String > toString(Expression< Character > character)
Predicate not(Expression< Boolean > restriction)
Predicate like(Expression< String > x, String pattern, char escapeChar)
Expression< Integer > mod(Expression< Integer > x, Integer y)
Predicate like(Expression< String > x, String pattern)
Predicate and(Predicate... restrictions)
Predicate or(Expression< Boolean > x, Expression< Boolean > y)
Predicate lt(Expression<? extends Number > x, Expression<? extends Number > y)
Predicate isFalse(Expression< Boolean > x)
Predicate and(Expression< Boolean > x, Expression< Boolean > y)
Predicate isNotNull(Expression<?> x)
Expression< Float > toFloat(Expression<? extends Number > number)
Order desc(Expression<?> x)
Expression< String > substring(Expression< String > x, int from, int len)
Expression< String > trim(Expression< Character > t, Expression< String > x)
Expression< BigInteger > toBigInteger(Expression<? extends Number > number)
Predicate equal(Expression<?> x, Object y)
Expression< Integer > length(Expression< String > x)
Expression< Long > sumAsLong(Expression< Integer > x)
Expression< Integer > locate(Expression< String > x, Expression< String > pattern)
Expression< Integer > toInteger(Expression<? extends Number > number)
Predicate notLike(Expression< String > x, Expression< String > pattern, Expression< Character > escapeChar)
Predicate notLike(Expression< String > x, String pattern, char escapeChar)
Predicate like(Expression< String > x, String pattern, Expression< Character > escapeChar)
Expression< Integer > mod(Expression< Integer > x, Expression< Integer > y)
Predicate notEqual(Expression<?> x, Expression<?> y)
Predicate le(Expression<? extends Number > x, Number y)
Expression< BigDecimal > toBigDecimal(Expression<? extends Number > number)
Expression< Integer > locate(Expression< String > x, String pattern, int from)
Expression< Long > count(Expression<?> x)
Predicate notLike(Expression< String > x, String pattern, Expression< Character > escapeChar)
Predicate notLike(Expression< String > x, Expression< String > pattern, char escapeChar)
Expression< Number > quot(Expression<? extends Number > x, Expression<? extends Number > y)
Predicate notEqual(Expression<?> x, Object y)
Expression< String > substring(Expression< String > x, int from)
Expression< String > lower(Expression< String > x)
Expression< String > substring(Expression< String > x, Expression< Integer > from, Expression< Integer > len)
Predicate like(Expression< String > x, Expression< String > pattern)
Expression< Long > countDistinct(Expression<?> x)
Expression< Integer > locate(Expression< String > x, Expression< String > pattern, Expression< Integer > from)
Predicate exists(Subquery<?> subquery)
Predicate gt(Expression<? extends Number > x, Expression<? extends Number > y)
Predicate notLike(Expression< String > x, String pattern)
Expression< String > trim(char t, Expression< String > x)
Expression< Date > currentDate()
Expression< Double > sumAsDouble(Expression< Float > x)
Expression< Integer > mod(Integer x, Expression< Integer > y)
Predicate ge(Expression<? extends Number > x, Expression<? extends Number > y)
Expression< Double > sqrt(Expression<? extends Number > x)
Predicate le(Expression<? extends Number > x, Expression<? extends Number > y)
Predicate equal(Expression<?> x, Expression<?> y)