Package nz.org.riskscape.engine.join
Class RealizedExpressionJoinIndexer
java.lang.Object
nz.org.riskscape.engine.join.JoinIndexer
nz.org.riskscape.engine.join.RealizedExpressionJoinIndexer
- Direct Known Subclasses:
HashIndexer,SpatialIndexer
Abstract JoinIndexer for creating indexers that perform some kind of comparison with
a boolean yielding RealizedExpression. Most likely lhs-rhs comparison of some kind.
-
Nested Class Summary
Nested classes/interfaces inherited from class nz.org.riskscape.engine.join.JoinIndexer
JoinIndexer.Constructor -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected nz.org.riskscape.engine.rl.RealizedExpressionYields the lhs value of the join condition - used for querying the index once builtprotected nz.org.riskscape.engine.rl.RealizedExpressionThe comparison operator between lhs and rhs.protected nz.org.riskscape.engine.rl.RealizedExpressionExpression yielding the rhs value - this will be the indexed objectFields inherited from class nz.org.riskscape.engine.join.JoinIndexer
expressionRealizer, join -
Constructor Summary
ConstructorsConstructorDescriptionRealizedExpressionJoinIndexer(nz.org.riskscape.engine.join.Join join, nz.org.riskscape.engine.rl.ExpressionRealizer expressionRealizer) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanisAllowed(nz.org.riskscape.engine.rl.RealizedExpression expression) Validates thatRealizedExpressionis able to be used for indexing.booleanisUsable()protected final voidInspects theJoinConditionto determine if it is suitable for indexing.Methods inherited from class nz.org.riskscape.engine.join.JoinIndexer
addToIndex, createRhsIterator, getExpressionRealizer, getJoin
-
Field Details
-
lhsExpression
protected nz.org.riskscape.engine.rl.RealizedExpression lhsExpressionYields the lhs value of the join condition - used for querying the index once built
-
rhsExpression
protected nz.org.riskscape.engine.rl.RealizedExpression rhsExpressionExpression yielding the rhs value - this will be the indexed object
-
operator
protected nz.org.riskscape.engine.rl.RealizedExpression operatorThe comparison operator between lhs and rhs.
-
-
Constructor Details
-
RealizedExpressionJoinIndexer
public RealizedExpressionJoinIndexer(nz.org.riskscape.engine.join.Join join, nz.org.riskscape.engine.rl.ExpressionRealizer expressionRealizer)
-
-
Method Details
-
isAllowed
protected boolean isAllowed(nz.org.riskscape.engine.rl.RealizedExpression expression) Validates that
RealizedExpressionis able to be used for indexing.The minimum requirement is the expression must return boolean.
- Parameters:
expression- to check- Returns:
- true if expression can be applied to this indexer
-
isUsable
public boolean isUsable()- Specified by:
isUsablein classJoinIndexer- 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.
-
processIndexableMetadata
protected final void processIndexableMetadata()Inspects the
JoinConditionto determine if it is suitable for indexing.If it is then the lhs and rhs Expressions will be set.
-