org.apache.openjpa.jdbc.sql
Class Join

java.lang.Object
  extended by org.apache.openjpa.jdbc.sql.Join
All Implemented Interfaces:
Cloneable, JoinSyntaxes

public class Join
extends Object
implements Cloneable, JoinSyntaxes

Represents a SQL join.

Author:
Abe White

Field Summary
static int TYPE_CROSS
           
static int TYPE_INNER
           
static int TYPE_OUTER
           
 
Fields inherited from interface org.apache.openjpa.jdbc.sql.JoinSyntaxes
SYNTAX_DATABASE, SYNTAX_SQL92, SYNTAX_TRADITIONAL
 
Constructor Summary
Join(Table table1, int alias1, Table table2, int alias2, ForeignKey fk, boolean inverse)
          Constructor for inner and outer joins.
 
Method Summary
 Object clone()
           
 boolean equals(Object other)
           
 String getAlias1()
           
 String getAlias2()
           
 ForeignKey getForeignKey()
           
(package private)  int getIndex1()
           
(package private)  int getIndex2()
           
 Joins getRelationJoins()
          If joining a relation, the joins leading to the relation.
 ClassMapping getRelationTarget()
          If joining a relation, the target type.
 int getSubclasses()
          If joining a relation, how to deal with subclasses.
 Table getTable1()
           
 Table getTable2()
           
 int getType()
           
 int hashCode()
           
 boolean isCorrelated()
           
 boolean isForeignKeyInversed()
           
 boolean isNotMyJoin()
           
 Join reverse()
          Return a join that is this join in reverse.
 void setCorrelated()
           
 void setIsNotMyJoin()
           
 void setRelation(ClassMapping target, int subs, Joins joins)
          When joining a relation, set target type and how to deal with subclasses.
 void setType(int type)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_INNER

public static final int TYPE_INNER
See Also:
Constant Field Values

TYPE_OUTER

public static final int TYPE_OUTER
See Also:
Constant Field Values

TYPE_CROSS

public static final int TYPE_CROSS
See Also:
Constant Field Values
Constructor Detail

Join

Join(Table table1,
     int alias1,
     Table table2,
     int alias2,
     ForeignKey fk,
     boolean inverse)
Constructor for inner and outer joins.

Method Detail

getType

public int getType()

setType

public void setType(int type)

getAlias1

public String getAlias1()

getAlias2

public String getAlias2()

getIndex1

int getIndex1()

getIndex2

int getIndex2()

getTable1

public Table getTable1()

getTable2

public Table getTable2()

getForeignKey

public ForeignKey getForeignKey()

isForeignKeyInversed

public boolean isForeignKeyInversed()

getRelationTarget

public ClassMapping getRelationTarget()
If joining a relation, the target type.


getSubclasses

public int getSubclasses()
If joining a relation, how to deal with subclasses. See subclass constants in Select.


getRelationJoins

public Joins getRelationJoins()
If joining a relation, the joins leading to the relation.


setRelation

public void setRelation(ClassMapping target,
                        int subs,
                        Joins joins)
When joining a relation, set target type and how to deal with subclasses. See subclass constants in #Select.


reverse

public Join reverse()
Return a join that is this join in reverse.


hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

clone

public Object clone()
Overrides:
clone in class Object

isCorrelated

public boolean isCorrelated()

setCorrelated

public void setCorrelated()

isNotMyJoin

public boolean isNotMyJoin()

setIsNotMyJoin

public void setIsNotMyJoin()


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.