Class JoinIndexer

java.lang.Object
nz.org.riskscape.engine.join.JoinIndexer
Direct Known Subclasses:
NoIndexIndexer, RealizedExpressionJoinIndexer

public abstract class JoinIndexer extends Object

Base class that collaborates with the DefaultJoiner to provide the rhs of a join, given the lhs.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
    Cheap 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

    Fields
    Modifier and Type
    Field
    Description
    protected final nz.org.riskscape.engine.rl.ExpressionRealizer
     
    protected final nz.org.riskscape.engine.join.Join
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    JoinIndexer(nz.org.riskscape.engine.join.Join join, nz.org.riskscape.engine.rl.ExpressionRealizer expressionRealizer)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
    addToIndex(nz.org.riskscape.engine.Tuple rhs)
     
    abstract nz.org.riskscape.engine.relation.TupleIterator
    createRhsIterator(nz.org.riskscape.engine.Tuple lhs)
    Create a TupleIterator that will contain at least the set of Tuples that are needed to completely join the lhs to the rhs based on the join.
    nz.org.riskscape.engine.rl.ExpressionRealizer
     
    nz.org.riskscape.engine.join.Join
     
    abstract boolean
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 TupleIterator that will contain at least the set of Tuples 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 DefaultJoiner can 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()