Package nz.org.riskscape.engine.join
Class Joiner
java.lang.Object
nz.org.riskscape.engine.join.Joiner
- All Implemented Interfaces:
nz.org.riskscape.engine.join.Join
Can join a relation on to another relation, tuple at a time.
-
Constructor Summary
ConstructorDescriptionJoiner
(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 TypeMethodDescriptionstatic 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 etcnz.org.riskscape.engine.types.Struct
getLhs()
The left-hand side of the join@NonNull nz.org.riskscape.engine.join.JoinCondition
getOn()
Used to determine whether tuples should be joined or notnz.org.riskscape.engine.types.Struct
getRhs()
The right-hand side of the joinint
hashCode()
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 joinConditiontoString()
withJoinConditon
(nz.org.riskscape.engine.join.JoinCondition newOn) Clone this join with a differentJoinCondition
withJoinType
(nz.org.riskscape.engine.join.JoinType newJoinType) Clone this join with a differentJoinType
-
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
Clone this join with a different
JoinType
-
withJoinConditon
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 interfacenz.org.riskscape.engine.join.Join
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
getLhs
public nz.org.riskscape.engine.types.Struct getLhs()The left-hand side of the join
- Specified by:
getLhs
in interfacenz.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 interfacenz.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 interfacenz.org.riskscape.engine.join.Join
-
getJoinType
@NonNull public @NonNull nz.org.riskscape.engine.join.JoinType getJoinType()Whether left, inner etc
- Specified by:
getJoinType
in interfacenz.org.riskscape.engine.join.Join
-
getJoinedType
@NonNull public @NonNull nz.org.riskscape.engine.types.Struct getJoinedType()- Specified by:
getJoinedType
in interfacenz.org.riskscape.engine.join.Join
-