minor rearrangement

This commit is contained in:
hns 2001-01-03 19:32:03 +00:00
parent 15127efd4d
commit 18478e9bf6

View file

@ -218,7 +218,10 @@ public class Relation {
throw new RuntimeException ("getVirtualSubnodeRelation called on non-virtual relation");
if (filter != null)
return filter;
return getVirtualPropertyRelation ();
Relation vr = new Relation (other, localField, remoteField, direction, subnodesAreProperties);
vr.groupby = groupby;
vr.filter = filter;
return vr;
}
/**
@ -237,7 +240,11 @@ public class Relation {
* Return a Relation that defines the subnodes of a group-by node.
*/
public Relation getGroupbySubnodeRelation () {
return getGroupbyPropertyRelation ();
if (groupby == null)
throw new RuntimeException ("getGroupbyPropertyRelation called on non-group-by relation");
if (filter != null)
return filter;
return new Relation (other, localField, remoteField, direction, true);
}
/**
@ -246,9 +253,7 @@ public class Relation {
public Relation getGroupbyPropertyRelation () {
if (groupby == null)
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, true);
}