-
Notifications
You must be signed in to change notification settings - Fork 14
/
PathImpl.java
43 lines (33 loc) · 1.18 KB
/
PathImpl.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
package cz.cvut.kbss.jopa.query.criteria;
import cz.cvut.kbss.jopa.model.metamodel.Attribute;
import cz.cvut.kbss.jopa.model.query.criteria.Expression;
import cz.cvut.kbss.jopa.model.query.criteria.Path;
import cz.cvut.kbss.jopa.model.query.criteria.Selection;
public class PathImpl<X> extends ExpressionImpl<X> implements Path<X> {
public PathImpl(Class<X> type) {
super(type, new ExpressionEntityImpl<>(type));
}
public PathImpl(String attributeName) {
super(null, new ExpressionAttributeImpl<>(attributeName));
}
public PathImpl(String attributeName, Expression expression){
super(null, new ExpressionAttributeImpl<>(attributeName, expression));
}
protected String getQueryPart() {
return null;
}
@Override
public <Y> Path<Y> getAttr(String attributeName) throws IllegalArgumentException {
Path<Y> nextExpression = new PathImpl<Y>(attributeName, this.expression);
this.expression = nextExpression;
return nextExpression;
}
@Override
public Path<?> getParentPath() {
return null;
}
@Override
public Expression<Class<? extends X>> type() {
return null;
}
}