public class CompatibleRelationGroup extends Object
Relation
s that can be combined into a single
relation without changing the semantics of NodeMaker
s.
Relations can be combined if they access the same database and
they contain exactly the same joins. If they both contain no joins,
they must contain only columns from the same table.
Relations that just differ in their WHERE
clause (condition)
can still be combined, but require that the new relation has the disjunction
(OR
) of all conditions as a WHERE
clause, and
the individual conditions must be added to the SELECT
list
(as ProjectionSpec
s) so that bindings are generated only
if that clause is TRUE
TODO: Should check if the BindingMaker already has a condition?Constructor and Description |
---|
CompatibleRelationGroup() |
Modifier and Type | Method and Description |
---|---|
void |
addBindingMaker(Relation relation,
BindingMaker bindingMaker) |
void |
addRelation(Relation relation) |
Relation |
baseRelation() |
Collection<BindingMaker> |
bindingMakers() |
static Collection<CompatibleRelationGroup> |
groupNodeRelations(Collection<? extends NodeRelation> nodeRelations) |
boolean |
isCompatible(Relation otherRelation) |
public static Collection<CompatibleRelationGroup> groupNodeRelations(Collection<? extends NodeRelation> nodeRelations)
public boolean isCompatible(Relation otherRelation)
public void addRelation(Relation relation)
public void addBindingMaker(Relation relation, BindingMaker bindingMaker)
public Relation baseRelation()
public Collection<BindingMaker> bindingMakers()