Class Joiner

java.lang.Object
nz.org.riskscape.engine.join.Joiner
All Implemented Interfaces:
nz.org.riskscape.engine.join.Join

public class Joiner extends Object implements nz.org.riskscape.engine.join.Join

Can join a relation on to another relation, tuple at a time.

  • Constructor Summary

    Constructors
    Constructor
    Description
    Joiner(nz.org.riskscape.engine.types.Struct lhs, nz.org.riskscape.engine.types.Struct rhs, nz.org.riskscape.engine.join.JoinCondition on)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static nz.org.riskscape.problem.ResultOrProblems<Joiner>
    build(nz.org.riskscape.engine.types.Struct lhs, nz.org.riskscape.engine.types.Struct rhs, nz.org.riskscape.engine.join.JoinCondition on, nz.org.riskscape.engine.join.JoinType joinType)
    Attempt to build a join from the given join parameters, returning a failed result if either the joined type or the join condition are invalid.
    protected boolean
     
    boolean
     
    @NonNull nz.org.riskscape.engine.types.Struct
     
    @NonNull nz.org.riskscape.engine.join.JoinType
    Whether left, inner etc
    nz.org.riskscape.engine.types.Struct
    The left-hand side of the join
    @NonNull nz.org.riskscape.engine.join.JoinCondition
    Used to determine whether tuples should be joined or not
    nz.org.riskscape.engine.types.Struct
    The right-hand side of the join
    int
     
    nz.org.riskscape.engine.Tuple
    join(nz.org.riskscape.engine.Tuple lhsTuple, nz.org.riskscape.engine.Tuple rhsTuple)
    Create a joined tuple of joinedType that can be used with our joinCondition
     
    withJoinConditon(nz.org.riskscape.engine.join.JoinCondition newOn)
    Clone this join with a different JoinCondition
    withJoinType(nz.org.riskscape.engine.join.JoinType newJoinType)
    Clone this join with a different JoinType

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Joiner

      public Joiner(nz.org.riskscape.engine.types.Struct lhs, nz.org.riskscape.engine.types.Struct rhs, nz.org.riskscape.engine.join.JoinCondition on)
  • Method Details

    • build

      public static nz.org.riskscape.problem.ResultOrProblems<Joiner> build(nz.org.riskscape.engine.types.Struct lhs, nz.org.riskscape.engine.types.Struct rhs, nz.org.riskscape.engine.join.JoinCondition on, nz.org.riskscape.engine.join.JoinType joinType)

      Attempt to build a join from the given join parameters, returning a failed result if either the joined type or the join condition are invalid.

    • withJoinType

      public Joiner withJoinType(nz.org.riskscape.engine.join.JoinType newJoinType)

      Clone this join with a different JoinType

    • withJoinConditon

      public Joiner withJoinConditon(nz.org.riskscape.engine.join.JoinCondition newOn)

      Clone this join with a different JoinCondition

    • join

      public nz.org.riskscape.engine.Tuple join(nz.org.riskscape.engine.Tuple lhsTuple, nz.org.riskscape.engine.Tuple rhsTuple)

      Create a joined tuple of joinedType that can be used with our joinCondition

      Specified by:
      join in interface nz.org.riskscape.engine.join.Join
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getLhs

      public nz.org.riskscape.engine.types.Struct getLhs()

      The left-hand side of the join

      Specified by:
      getLhs in interface nz.org.riskscape.engine.join.Join
    • getRhs

      public nz.org.riskscape.engine.types.Struct getRhs()

      The right-hand side of the join

      Specified by:
      getRhs in interface nz.org.riskscape.engine.join.Join
    • getOn

      @NonNull public @NonNull nz.org.riskscape.engine.join.JoinCondition getOn()

      Used to determine whether tuples should be joined or not

      Specified by:
      getOn in interface nz.org.riskscape.engine.join.Join
    • getJoinType

      @NonNull public @NonNull nz.org.riskscape.engine.join.JoinType getJoinType()

      Whether left, inner etc

      Specified by:
      getJoinType in interface nz.org.riskscape.engine.join.Join
    • getJoinedType

      @NonNull public @NonNull nz.org.riskscape.engine.types.Struct getJoinedType()
      Specified by:
      getJoinedType in interface nz.org.riskscape.engine.join.Join