org.apache.torque.util
Class Criteria.Join

java.lang.Object
  extended by org.apache.torque.util.Criteria.Join
Enclosing class:
Criteria

public static class Criteria.Join
extends java.lang.Object

Data object to describe a join between two tables, for example

 table_a LEFT JOIN table_b ON table_a.id = table_b.a_id
 
The class is immutable. Because the class is also used by BasePeer, it is visible from the package.


Constructor Summary
Criteria.Join(java.lang.String leftColumn, java.lang.String rightColumn, SqlEnum joinType)
          Constructor
 
Method Summary
 boolean equals(java.lang.Object obj)
          This method checks another Criteria.Join to see if they contain the same attributes.
 SqlEnum getJoinType()
           
 java.lang.String getLeftColumn()
           
 java.lang.String getRightColumn()
           
 int hashCode()
          Returns the hash code value for this Join.
 java.lang.String toString()
          returns a String representation of the class, mainly for debuggung purposes
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Criteria.Join

public Criteria.Join(java.lang.String leftColumn,
                     java.lang.String rightColumn,
                     SqlEnum joinType)
Constructor

Parameters:
leftColumn - the left column of the join condition; might contain an alias name
rightColumn - the right column of the join condition might contain an alias name
joinType - the type of the join. Valid join types are null (adding the join condition to the where clause), SqlEnum.LEFT_JOIN, SqlEnum.RIGHT_JOIN, and SqlEnum.INNER_JOIN
Method Detail

getJoinType

public final SqlEnum getJoinType()
Returns:
the type of the join, i.e. SqlEnum.LEFT_JOIN, ..., or null for adding the join condition to the where Clause

getLeftColumn

public final java.lang.String getLeftColumn()
Returns:
the left column of the join condition

getRightColumn

public final java.lang.String getRightColumn()
Returns:
the right column of the join condition

toString

public java.lang.String toString()
returns a String representation of the class, mainly for debuggung purposes

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

equals

public boolean equals(java.lang.Object obj)
This method checks another Criteria.Join to see if they contain the same attributes.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Returns the hash code value for this Join.

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value for this object.


Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.