org.teiid.query.sql.lang
Class JoinType

java.lang.Object
  extended by org.teiid.query.sql.lang.JoinType
All Implemented Interfaces:
java.lang.Cloneable, LanguageObject

public class JoinType
extends java.lang.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
static JoinType JOIN_ANTI_SEMI
          internal ANTI SEMI Join type
static JoinType JOIN_CROSS
          Represents a cross join: a CROSS JOIN b
static JoinType JOIN_FULL_OUTER
          Represents a full outer join: a FULL OUTER JOIN b
static JoinType JOIN_INNER
          Represents an inner join: a INNER JOIN b
static JoinType JOIN_LEFT_OUTER
          Represents a left outer join: a LEFT OUTER JOIN b
static JoinType JOIN_RIGHT_OUTER
          Represents a right outer join: a RIGHT OUTER JOIN b
static JoinType JOIN_SEMI
          internal SEMI Join type
static JoinType JOIN_UNION
          Represents a union join: a UNION JOIN b - not used after rewrite
 
Method Summary
 void acceptVisitor(LanguageVisitor visitor)
          Method for accepting a visitor.
 java.lang.Object clone()
          Class is immutable, so clone can just return the same class
 boolean equals(java.lang.Object other)
          Override Object.equals() to compare objects
 JoinType getReverseType()
          To switch directions from left to right or right to left.
 int hashCode()
          Get hash code for this type
 boolean isOuter()
          Check if this join type is an outer join.
 boolean isSemi()
           
 java.lang.String toString()
          Returns a string representation of an instance of this class.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

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

isSemi

public boolean isSemi()

equals

public boolean equals(java.lang.Object other)
Override Object.equals() to compare objects

Overrides:
equals in class java.lang.Object
Parameters:
other - Other object
Returns:
True if equal

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 interface LanguageObject
Parameters:
visitor - Visitor being used

hashCode

public int hashCode()
Get hash code for this type

Overrides:
hashCode in class java.lang.Object
Returns:
Hash code

clone

public java.lang.Object clone()
Class is immutable, so clone can just return the same class

Specified by:
clone in interface LanguageObject
Overrides:
clone in class java.lang.Object
Returns:
Same object - these objects are immutable

toString

public java.lang.String toString()
Returns a string representation of an instance of this class.

Overrides:
toString in class java.lang.Object
Returns:
String representation of object


Copyright © 2010. All Rights Reserved.