-
Notifications
You must be signed in to change notification settings - Fork 14
/
CriteriaQueryHolder.java
101 lines (72 loc) · 2.24 KB
/
CriteriaQueryHolder.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
package cz.cvut.kbss.jopa.query.criteria;
import cz.cvut.kbss.jopa.model.query.Parameter;
import cz.cvut.kbss.jopa.model.query.criteria.Order;
import cz.cvut.kbss.jopa.query.criteria.expressions.AbstractExpression;
import java.util.Collections;
import java.util.List;
import java.util.Set;
public class CriteriaQueryHolder<T> {
protected final Class<T> resultType;
protected SelectionImpl<? extends T> selection;
private boolean distinct;
protected AbstractExpression<Boolean> where;
protected List<Order> orderBy;
protected RootImpl<?> root;
public CriteriaQueryHolder(Class<T> resultType) {
this.resultType = resultType;
this.distinct = false;
}
public RootImpl<?> getRoot() {
return root;
}
public void setRoot(RootImpl<?> root) {
this.root = root;
}
public AbstractExpression<Boolean> getWhere() {
return where;
}
public void setWhere(AbstractExpression<Boolean> where) {
this.where = where;
}
public List<Order> getOrderBy() {
if (orderBy == null) return Collections.emptyList();
return orderBy;
}
public void setOrderBy(List<Order> orderBy) {
this.orderBy = orderBy;
}
public SelectionImpl<? extends T> getSelection() {
return selection;
}
public void setSelection(SelectionImpl<? extends T> selection) {
this.selection = selection;
}
public boolean isDistinct() {
return distinct;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public Set<Parameter<?>> getParameters() {
return null;
}
public Parameter<?> getParameter(String name) {
return null;
}
public Parameter<?> getParameter(int position) {
return null;
}
public Object getParameterValue(Parameter<?> parameter) {
return null;
}
public <T> void setParameter(Parameter<T> parameter, Object value) {
}
public <T> void setParameter(Parameter<T> parameter, String value, String language) {
}
public <T> void setUntypedParameter(Parameter<T> parameter, Object value) {
}
public void clearParameter(Parameter<?> parameter) {
}
public void clearParameters() {
}
}