jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cla...@apache.org
Subject [1/2] jena git commit: Added Query.setGroupBy( VarExprList) in support of QueryBuilder and to close JENA-945
Date Tue, 19 May 2015 15:55:15 GMT
Repository: jena
Updated Branches:
  refs/heads/master 62229837f -> 8d5f1cb27


Added Query.setGroupBy( VarExprList) in support of QueryBuilder and to close
JENA-945


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/716640bb
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/716640bb
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/716640bb

Branch: refs/heads/master
Commit: 716640bbe42bae9c014ce5fae99af37e2f9f6692
Parents: 6222983
Author: Claude Warren <claude@apache.org>
Authored: Tue May 19 16:44:33 2015 +0100
Committer: Claude Warren <claude@apache.org>
Committed: Tue May 19 16:44:33 2015 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/jena/query/Query.java | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/716640bb/jena-arq/src/main/java/org/apache/jena/query/Query.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/main/java/org/apache/jena/query/Query.java b/jena-arq/src/main/java/org/apache/jena/query/Query.java
index d156247..4bbf5d7 100644
--- a/jena-arq/src/main/java/org/apache/jena/query/Query.java
+++ b/jena-arq/src/main/java/org/apache/jena/query/Query.java
@@ -484,6 +484,23 @@ public class Query extends Prologue implements Cloneable, Printable
     
     public VarExprList getGroupBy()      { return groupVars ; }
     
+    /**
+     * Set the group by list.
+     * If groupVars is null the list is reset to an empty list.
+     * @param groupVars The variables to group the query by.
+     */
+    public void setGroupBy( VarExprList groupVars )
+    {
+    	if (groupVars == null)
+    	{
+    		this.groupVars = new VarExprList();
+    	}
+    	else
+    	{
+    		this.groupVars = groupVars;
+    	}
+    }
+    
     public List<Expr> getHavingExprs()    { return havingExprs ; }
     
     public void addGroupBy(String varName)


Mime
View raw message