Package org.teiid.query.sql.lang
Class JoinPredicate
- java.lang.Object
-
- org.teiid.query.sql.lang.FromClause
-
- org.teiid.query.sql.lang.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:- GroupA CROSS JOIN GroupB
- GroupA JOIN GroupB ON GroupA.E1=GroupB.E1 AND GroupA.E2=GroupB.E2
- GroupA RIGHT OUTER JOIN (GroupB JOIN GroupC ON GroupB.E1=GroupC.E1) ON GroupA.E1=GroupB.E1
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.teiid.query.sql.LanguageObject
LanguageObject.Util
-
-
Field Summary
-
Fields inherited from class org.teiid.query.sql.lang.FromClause
PRESERVE
-
-
Constructor Summary
Constructors Constructor Description JoinPredicate()
Construct a JoinPredicateJoinPredicate(FromClause leftClause, FromClause rightClause, JoinType type)
Construct a JoinPredicate between two clauses of the specified type.JoinPredicate(FromClause leftClause, FromClause rightClause, JoinType type, List criteria)
Construct a JoinPredicate between two clauses of the specified type.JoinPredicate(FromClause leftClause, FromClause rightClause, JoinType type, Criteria criteria)
Construct a JoinPredicate between two clauses of the specified type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acceptVisitor(LanguageVisitor visitor)
Method for accepting a visitor.protected FromClause
cloneDirect()
Return deep clone for objectvoid
collectGroups(Collection<GroupSymbol> groups)
Collect all GroupSymbols for this from clause.boolean
equals(Object obj)
Compare this object to anotherList
getJoinCriteria()
Get join criteria for this predicateJoinType
getJoinType()
Get join type for this predicateFromClause
getLeftClause()
Get left clauseFromClause
getRightClause()
Get right clauseint
hashCode()
Get hash code for objectvoid
setJoinCriteria(List criteria)
Set join criteria for this predicatevoid
setJoinType(JoinType type)
Set join type for this predicatevoid
setLeftClause(FromClause predicate)
Set left clausevoid
setRightClause(FromClause predicate)
Set right clause-
Methods inherited from class org.teiid.query.sql.lang.FromClause
clone, getMakeDep, getMakeInd, hasHint, isMakeDep, isMakeNotDep, isNoUnnest, isOptional, isPreserve, setMakeDep, setMakeDep, setMakeInd, setMakeNotDep, setNoUnnest, setOptional, setPreserve, toString
-
-
-
-
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 clauserightClause
- Right from clausetype
- 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 clauserightClause
- Right from clausetype
- Type of joincriteria
- 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 clauserightClause
- Right from clausetype
- Type of joincriteria
- 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 ofCriteria
set on this predicate
-
getJoinCriteria
public List getJoinCriteria()
Get join criteria for this predicate- Returns:
- List of
Criteria
-
collectGroups
public void collectGroups(Collection<GroupSymbol> groups)
Collect all GroupSymbols for this from clause.- Specified by:
collectGroups
in classFromClause
- Parameters:
groups
- Groups to add to
-
acceptVisitor
public void acceptVisitor(LanguageVisitor visitor)
Description copied from interface:LanguageObject
Method for accepting a visitor. It is the responsibility of the language object to call back on the visitor.- Specified by:
acceptVisitor
in interfaceLanguageObject
- Specified by:
acceptVisitor
in classFromClause
- Parameters:
visitor
- Visitor being used
-
equals
public boolean equals(Object obj)
Compare this object to another- Overrides:
equals
in classFromClause
- Parameters:
obj
- Other object- Returns:
- True if equal
-
hashCode
public int hashCode()
Get hash code for object
-
cloneDirect
protected FromClause cloneDirect()
Return deep clone for object- Specified by:
cloneDirect
in classFromClause
- Returns:
- Deep clone
-
-