Package nz.org.riskscape.engine.join
Class JoinIndexer
java.lang.Object
nz.org.riskscape.engine.join.JoinIndexer
- Direct Known Subclasses:
NoIndexIndexer,RealizedExpressionJoinIndexer
Base class that collaborates with the DefaultJoiner to provide the rhs of a join, given the lhs.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceCheap way of avoiding a full-on factory pattern thing - each Indexer implementation should offer a Constructor to build an indexer from the given arguments. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final nz.org.riskscape.engine.rl.ExpressionRealizerprotected final nz.org.riskscape.engine.join.Join -
Constructor Summary
ConstructorsConstructorDescriptionJoinIndexer(nz.org.riskscape.engine.join.Join join, nz.org.riskscape.engine.rl.ExpressionRealizer expressionRealizer) -
Method Summary
Modifier and TypeMethodDescriptionabstract voidaddToIndex(nz.org.riskscape.engine.Tuple rhs) abstract nz.org.riskscape.engine.relation.TupleIteratorcreateRhsIterator(nz.org.riskscape.engine.Tuple lhs) Create aTupleIteratorthat will contain at least the set ofTuples that are needed to completely join the lhs to the rhs based on the join.nz.org.riskscape.engine.rl.ExpressionRealizernz.org.riskscape.engine.join.JoingetJoin()abstract booleanisUsable()
-
Field Details
-
join
protected final nz.org.riskscape.engine.join.Join join -
expressionRealizer
protected final nz.org.riskscape.engine.rl.ExpressionRealizer expressionRealizer
-
-
Constructor Details
-
JoinIndexer
public JoinIndexer(nz.org.riskscape.engine.join.Join join, nz.org.riskscape.engine.rl.ExpressionRealizer expressionRealizer)
-
-
Method Details
-
addToIndex
public abstract void addToIndex(nz.org.riskscape.engine.Tuple rhs) -
createRhsIterator
public abstract nz.org.riskscape.engine.relation.TupleIterator createRhsIterator(nz.org.riskscape.engine.Tuple lhs) Create a
TupleIteratorthat will contain at least the set ofTuples that are needed to completely join the lhs to the rhs based on the join. -
isUsable
public abstract boolean isUsable()- Returns:
- true if this join can be used, e.g. it's suitable for the query and join. This is intended as a simpler
way of providing a set of implementations such that the
DefaultJoinercan work through which ones are appropriate by checking this method.
-
getJoin
public nz.org.riskscape.engine.join.Join getJoin() -
getExpressionRealizer
public nz.org.riskscape.engine.rl.ExpressionRealizer getExpressionRealizer()
-