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
Modifier and TypeFieldDescriptionprotected nz.org.riskscape.engine.rl.RealizedExpression
Yields the lhs value of the join condition - used for querying the index once builtprotected nz.org.riskscape.engine.rl.RealizedExpression
The comparison operator between lhs and rhs.protected nz.org.riskscape.engine.rl.RealizedExpression
Expression yielding the rhs value - this will be the indexed objectFields inherited from class nz.org.riskscape.engine.join.JoinIndexer
expressionRealizer, join
-
Constructor Summary
ConstructorDescriptionRealizedExpressionJoinIndexer
(nz.org.riskscape.engine.join.Join join, nz.org.riskscape.engine.rl.ExpressionRealizer expressionRealizer) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
isAllowed
(nz.org.riskscape.engine.rl.RealizedExpression expression) Validates thatRealizedExpression
is able to be used for indexing.boolean
isUsable()
protected final void
Inspects theJoinCondition
to 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
RealizedExpression
is 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:
isUsable
in 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
DefaultJoiner
can work through which ones are appropriate by checking this method.
-
processIndexableMetadata
protected final void processIndexableMetadata()Inspects the
JoinCondition
to determine if it is suitable for indexing.If it is then the lhs and rhs Expressions will be set.
-