Class JoinPredicate

  • All Implemented Interfaces:
    Cloneable, LanguageObject

    public class JoinPredicate
    extends FromClause
    Represents a subpart of the FROM clause specifying a join within the FROM. It may optionally specify criteria for the join, depending on the join type. For example, these are some representations of JoinPredicates:
    1. GroupA CROSS JOIN GroupB
    2. GroupA JOIN GroupB ON GroupA.E1=GroupB.E1 AND GroupA.E2=GroupB.E2
    3. GroupA RIGHT OUTER JOIN (GroupB JOIN GroupC ON GroupB.E1=GroupC.E1) ON GroupA.E1=GroupB.E1
    • Constructor Detail

      • JoinPredicate

        public JoinPredicate()
        Construct a JoinPredicate
      • JoinPredicate

        public JoinPredicate​(FromClause leftClause,
                             FromClause rightClause,
                             JoinType type)
        Construct a JoinPredicate between two clauses of the specified type.
        Parameters:
        leftClause - Left from clause
        rightClause - Right from clause
        type - Type of join
      • JoinPredicate

        public JoinPredicate​(FromClause leftClause,
                             FromClause rightClause,
                             JoinType type,
                             List criteria)
        Construct a JoinPredicate between two clauses of the specified type.
        Parameters:
        leftClause - Left from clause
        rightClause - Right from clause
        type - Type of join
        criteria - List of Criteria for this join predicate
      • JoinPredicate

        public JoinPredicate​(FromClause leftClause,
                             FromClause rightClause,
                             JoinType type,
                             Criteria criteria)
        Construct a JoinPredicate between two clauses of the specified type.
        Parameters:
        leftClause - Left from clause
        rightClause - Right from clause
        type - Type of join
        criteria - List of Criteria for this join predicate
    • Method Detail

      • setLeftClause

        public void setLeftClause​(FromClause predicate)
        Set left clause
        Parameters:
        predicate - Left clause to set
      • getLeftClause

        public FromClause getLeftClause()
        Get left clause
        Returns:
        Left clause
      • setRightClause

        public void setRightClause​(FromClause predicate)
        Set right clause
        Parameters:
        predicate - Right clause to set
      • getRightClause

        public FromClause getRightClause()
        Get right clause
        Returns:
        Right clause
      • setJoinType

        public void setJoinType​(JoinType type)
        Set join type for this predicate
        Parameters:
        type - Type of join
      • getJoinType

        public JoinType getJoinType()
        Get join type for this predicate
        Returns:
        Type of join
      • setJoinCriteria

        public void setJoinCriteria​(List criteria)
        Set join criteria for this predicate
        Parameters:
        criteria - List of Criteria set on this predicate
      • getJoinCriteria

        public List getJoinCriteria()
        Get join criteria for this predicate
        Returns:
        List of Criteria
      • equals

        public boolean equals​(Object obj)
        Compare this object to another
        Overrides:
        equals in class FromClause
        Parameters:
        obj - Other object
        Returns:
        True if equal
      • hashCode

        public int hashCode()
        Get hash code for object
        Overrides:
        hashCode in class Object
        Returns:
        Hash code