Skip to content

Method: setAttribute(SoqlAttribute)

1: package cz.cvut.kbss.jopa.query.soql;
2:
3: public class SoqlGroupParameter extends SoqlParameter {
4:
5: private SoqlAttribute attribute;
6:
7: public SoqlGroupParameter(SoqlNode firstNode) {
8: setFirstNode(firstNode);
9: }
10:
11: public SoqlAttribute getAttribute() {
12: return attribute;
13: }
14:
15: public void setAttribute(SoqlAttribute attribute) {
16: this.attribute = attribute;
17: }
18:
19: public String getGroupByPart() {
20: String param = attribute.isFilter() ? getAsParam().substring(1) : attribute.getValue().substring(1);
21: return "?" + param + " ";
22: }
23: }