Cleaned up virtual and groupby relations. Let's see how it works ;->

This commit is contained in:
hns 2001-01-03 15:17:24 +00:00
parent ced24237b6
commit 40c290efbc

View file

@ -229,6 +229,7 @@ public class Relation {
throw new RuntimeException ("getVirtualPropertyRelation called on non-virtual relation"); throw new RuntimeException ("getVirtualPropertyRelation called on non-virtual relation");
Relation vr = new Relation (other, localField, remoteField, direction, subnodesAreProperties); Relation vr = new Relation (other, localField, remoteField, direction, subnodesAreProperties);
vr.groupby = groupby; vr.groupby = groupby;
vr.filter = filter;
return vr; return vr;
} }
@ -236,10 +237,6 @@ public class Relation {
* Return a Relation that defines the subnodes of a group-by node. * Return a Relation that defines the subnodes of a group-by node.
*/ */
public Relation getGroupbySubnodeRelation () { public Relation getGroupbySubnodeRelation () {
if (groupby == null)
throw new RuntimeException ("getGroupbySubnodeRelation called on non-group-by relation");
if (filter != null)
return filter;
return getGroupbyPropertyRelation (); return getGroupbyPropertyRelation ();
} }
@ -249,6 +246,8 @@ public class Relation {
public Relation getGroupbyPropertyRelation () { public Relation getGroupbyPropertyRelation () {
if (groupby == null) if (groupby == null)
throw new RuntimeException ("getGroupbyPropertyRelation called on non-group-by relation"); throw new RuntimeException ("getGroupbyPropertyRelation called on non-group-by relation");
if (filter != null)
return filter;
return new Relation (other, localField, remoteField, direction, subnodesAreProperties); return new Relation (other, localField, remoteField, direction, subnodesAreProperties);
} }