diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2018-08-10 22:46:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-10 22:46:55 +0200 |
commit | 7c33ec7cecbf65bd1019576d658af51cd104cab0 (patch) | |
tree | c3dcd730ebd17ad6a314424ff0d7edc7bfdc982a /container-search/src/main/java/com/yahoo/search/query/Select.java | |
parent | 047586da5f5889a5329b45c9059b2fc9fb5bdce6 (diff) |
Revert "Added a object structure for GroupingRequest objects, accessable from…"
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/query/Select.java')
-rw-r--r-- | container-search/src/main/java/com/yahoo/search/query/Select.java | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/query/Select.java b/container-search/src/main/java/com/yahoo/search/query/Select.java index ef6a7fe8272..3ffc6bddb24 100644 --- a/container-search/src/main/java/com/yahoo/search/query/Select.java +++ b/container-search/src/main/java/com/yahoo/search/query/Select.java @@ -10,9 +10,6 @@ import com.yahoo.search.query.profile.types.FieldDescription; import com.yahoo.search.query.profile.types.QueryProfileType; import com.yahoo.search.yql.VespaGroupingStep; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; /** @@ -30,11 +27,11 @@ public class Select implements Cloneable { public static final String WHERE = "where"; public static final String GROUPING = "grouping"; + private static Model model; private Query parent; private String where = ""; private String grouping = ""; - private List<GroupingRequest> groupingRequests = new ArrayList<>(); static { argumentType = new QueryProfileType(SELECT); @@ -70,10 +67,8 @@ public class Select implements Cloneable { } - /** Set the where-clause for the query. Must be a JSON-string, with the format described in the Select Reference doc: - * @see <a href="https://docs.vespa.ai/documentation/reference/select-reference.html">https://docs.vespa.ai/documentation/reference/select-reference.html</a> - */ - public void setWhereString(String where) { + /** Set the where-clause for the query. Must be a JSON-string, with the format described in the Select Reference doc - https://docs.vespa.ai/documentation/reference/select-reference.html. */ + public void setWhere(String where) { this.where = where; model.setType(SELECT); @@ -83,13 +78,13 @@ public class Select implements Cloneable { /** Returns the where-clause in the query */ - public String getWhereString(){ return where; } + public String getWhereString(){ + return this.where; + } - /** Set the grouping-string for the query. Must be a JSON-string, with the format described in the Select Reference doc: - * @see <a href="https://docs.vespa.ai/documentation/reference/select-reference.html">https://docs.vespa.ai/documentation/reference/select-reference.html</a> - * */ - public void setGroupingString(String grouping){ + /** Set the grouping-string for the query. Must be a JSON-string, with the format described in the Select Reference doc - https://docs.vespa.ai/documentation/reference/select-reference.html. */ + public void setGrouping(String grouping){ this.grouping = grouping; SelectParser parser = (SelectParser) ParserFactory.newInstance(Query.Type.SELECT, new ParserEnvironment()); @@ -103,14 +98,10 @@ public class Select implements Cloneable { /** Returns the grouping in the query */ public String getGroupingString(){ - return grouping; + return this.grouping; } - /** Returns the query's {@link GroupingRequest} objects, as mutable list */ - public List<GroupingRequest> getGrouping(){ return groupingRequests; } - - @Override public String toString() { return "where: [" + where + "], grouping: [" + grouping+ "]"; |