Package org.teiid.query.sql.lang
Class JoinType
- java.lang.Object
-
- org.teiid.query.sql.lang.JoinType
-
- All Implemented Interfaces:
Cloneable
,LanguageObject
public class JoinType extends Object implements LanguageObject
This class represents a join type. Outer joins will put nulls on the outer side for non-matches. "Cross" joins have no criteria and are a cross product of all rows in each table. To use a JoinType, you should not (and cannot) construct the object - rather you should use the provided static constants.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.teiid.query.sql.LanguageObject
LanguageObject.Util
-
-
Field Summary
Fields Modifier and Type Field Description static JoinType
JOIN_ANTI_SEMI
internal ANTI SEMI Join typestatic JoinType
JOIN_CROSS
Represents a cross join: a CROSS JOIN bstatic JoinType
JOIN_FULL_OUTER
Represents a full outer join: a FULL OUTER JOIN bstatic JoinType
JOIN_INNER
Represents an inner join: a INNER JOIN bstatic JoinType
JOIN_LEFT_OUTER
Represents a left outer join: a LEFT OUTER JOIN bstatic JoinType
JOIN_RIGHT_OUTER
Represents a right outer join: a RIGHT OUTER JOIN bstatic JoinType
JOIN_SEMI
internal SEMI Join typestatic JoinType
JOIN_UNION
Represents a union join: a UNION JOIN b - not used after rewrite
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acceptVisitor(LanguageVisitor visitor)
Method for accepting a visitor.Object
clone()
Class is immutable, so clone can just return the same classboolean
equals(Object other)
Override Object.equals() to compare objectsJoinType
getReverseType()
To switch directions from left to right or right to left.int
hashCode()
Get hash code for this typeboolean
isOuter()
Check if this join type is an outer join.String
toString()
Returns a string representation of an instance of this class.
-
-
-
Field Detail
-
JOIN_INNER
public static final JoinType JOIN_INNER
Represents an inner join: a INNER JOIN b
-
JOIN_RIGHT_OUTER
public static final JoinType JOIN_RIGHT_OUTER
Represents a right outer join: a RIGHT OUTER JOIN b
-
JOIN_LEFT_OUTER
public static final JoinType JOIN_LEFT_OUTER
Represents a left outer join: a LEFT OUTER JOIN b
-
JOIN_FULL_OUTER
public static final JoinType JOIN_FULL_OUTER
Represents a full outer join: a FULL OUTER JOIN b
-
JOIN_CROSS
public static final JoinType JOIN_CROSS
Represents a cross join: a CROSS JOIN b
-
JOIN_UNION
public static final JoinType JOIN_UNION
Represents a union join: a UNION JOIN b - not used after rewrite
-
JOIN_SEMI
public static final JoinType JOIN_SEMI
internal SEMI Join type
-
JOIN_ANTI_SEMI
public static final JoinType JOIN_ANTI_SEMI
internal ANTI SEMI Join type
-
-
Method Detail
-
getReverseType
public JoinType getReverseType()
To switch directions from left to right or right to left. Joins that are not LEFT OUTER or RIGHT OUTER are returned unchanged.- Returns:
- New JoinType constant for the reverse join type
-
isOuter
public boolean isOuter()
Check if this join type is an outer join.- Returns:
- True if left/right/full outer, false if inner/cross
-
equals
public boolean equals(Object other)
Override Object.equals() to compare objects
-
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
- Parameters:
visitor
- Visitor being used
-
hashCode
public int hashCode()
Get hash code for this type
-
clone
public Object clone()
Class is immutable, so clone can just return the same class- Specified by:
clone
in interfaceLanguageObject
- Overrides:
clone
in classObject
- Returns:
- Same object - these objects are immutable
-
-