Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

oracle.javatools.db.sql
Class JoinObject

java.lang.Object
  extended by oracle.javatools.db.AbstractDBObject
      extended by oracle.javatools.db.AbstractChildDBObject
          extended by oracle.javatools.db.sql.AbstractSQLFragment
              extended by oracle.javatools.db.sql.JoinObject
All Implemented Interfaces:
ChildDBObject, DBObject, SQLFragment, Copyable, DynamicPropertySet

public class JoinObject
extends AbstractSQLFragment

Object that represent the JOIN clause of a SELECT statement (part of the FROM clause).


Nested Class Summary
 
Nested classes/interfaces inherited from class oracle.javatools.db.AbstractDBObject
AbstractDBObject.ChildSupport, AbstractDBObject.ListenerSupport
 
Field Summary
static java.lang.String CROSS
          Inner join type Usage: table_reference CROSS [INNER] JOIN table_reference
static java.lang.String FULL
          Outer join type: FULL Usage: table_reference [NATURAL] FULL [OUTER] JOIN table_reference [ON|USING...]
static java.lang.String INNER
          Inner join type Usage: table_reference [CROSS|NATURAL] [INNER] JOIN table_reference [ON|USING...]
static java.lang.String LEFT
          Outer join type: LEFT Usage: table_reference [NATURAL] LEFT [OUTER] JOIN table_reference [ON|USING...]
static java.lang.String RIGHT
          Outer join type: RIGHT Usage: table_reference [NATURAL] RIGHT [OUTER] JOIN table_reference [ON|USING...]
 
Fields inherited from class oracle.javatools.db.sql.AbstractSQLFragment
DEFAULT_SEPARATOR, EMPTY, EMPTY_ARRAY, NEWLINE, SPACE
 
Fields inherited from interface oracle.javatools.db.sql.SQLFragment
CONNECTBY, FROM, GROUPBY, HAVING, MODEL, NOCYCLE, ORDERBY, ORDERSIBLINGSBY, PRIOR, SELECT, STARTWITH, TYPE, WHERE
 
Fields inherited from interface oracle.javatools.db.DBObject
COMMENT
 
Constructor Summary
JoinObject()
           
JoinObject(FromObject left, FromObject right, JoinCondition condition)
          Creates a default join for the given FromObjects and condition.
JoinObject(FromObject left, FromObject right, java.lang.String type, boolean natural, JoinCondition condition)
          Note: If using existing FromObjects for the left or right parameters, it is the responsibility of the API user to remove these FromObjects from the query.
 
Method Summary
 JoinCondition getCondition()
           
 boolean getIncludeJoinKeyword()
           
 java.lang.String getJoinType()
           
 FromObject getLeftExpression()
           
 ExpressionList getLeftPartitionBy()
           
 FromObject getRightExpression()
           
 ExpressionList getRightPartitionBy()
           
 java.lang.String getSQLText()
          Return the SQL for this fragment.
 boolean isNatural()
           
 boolean isOuterJoin()
          Returns true if this is a FULL, LEFT or RIGHT OUTER JOIN, and false if this is an INNER JOIN.
 void setCondition(JoinCondition condition)
           
 void setIncludeJoinKeyword(boolean inc)
           
 void setJoinType(java.lang.String type)
           
 void setLeftExpression(FromObject left)
           
 void setLeftPartitionBy(ExpressionList leftPartitionBy)
           
 void setNatural(boolean natural)
           
 void setRightExpression(FromObject right)
           
 void setRightPartitionBy(ExpressionList rightPartitionBy)
           
 
Methods inherited from class oracle.javatools.db.sql.AbstractSQLFragment
appendToBuffer, argsToString, getStartOffset, getTextOrNull, getTextOrNull, getType, setParent, setStartOffset, surroundWithBrackets, surroundWithBrackets, toString
 
Methods inherited from class oracle.javatools.db.AbstractChildDBObject
copyToImpl, findParent, getParent, getProperty, setProperty
 
Methods inherited from class oracle.javatools.db.AbstractDBObject
changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyTo, equals, equalsImpl, findOwnedObject, findOwnedObject, findOwnedObject, getChildSupport, getID, getName, getOwnedObjects, getOwnedObjects, getOwnedObjectsImpl, getProperties, getProperty, getReferenceIDs, getReferenceIDsImpl, hashCode, includeOwnedObject, includesType, includesType, removeThisAsParent, replaceReferenceIDs, setID, setName, setProperties
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.javatools.db.ChildDBObject
getParent
 
Methods inherited from interface oracle.javatools.db.DBObject
copyTo, copyTo, copyTo, findOwnedObject, findOwnedObject, getID, getName, getOwnedObjects, getOwnedObjects, getReferenceIDs, replaceReferenceIDs, setID, setName
 
Methods inherited from interface oracle.javatools.util.DynamicPropertySet
getProperties, getProperty, getProperty, setProperties, setProperty
 

Field Detail

LEFT

public static final java.lang.String LEFT
Outer join type: LEFT Usage: table_reference [NATURAL] LEFT [OUTER] JOIN table_reference [ON|USING...]

See Also:
Constant Field Values

RIGHT

public static final java.lang.String RIGHT
Outer join type: RIGHT Usage: table_reference [NATURAL] RIGHT [OUTER] JOIN table_reference [ON|USING...]

See Also:
Constant Field Values

FULL

public static final java.lang.String FULL
Outer join type: FULL Usage: table_reference [NATURAL] FULL [OUTER] JOIN table_reference [ON|USING...]

See Also:
Constant Field Values

INNER

public static final java.lang.String INNER
Inner join type Usage: table_reference [CROSS|NATURAL] [INNER] JOIN table_reference [ON|USING...]

See Also:
Constant Field Values

CROSS

public static final java.lang.String CROSS
Inner join type Usage: table_reference CROSS [INNER] JOIN table_reference

See Also:
Constant Field Values
Constructor Detail

JoinObject

public JoinObject()

JoinObject

public JoinObject(FromObject left,
                  FromObject right,
                  JoinCondition condition)
Creates a default join for the given FromObjects and condition. (INNER) Note: If using existing FromObjects for the left or right parameters, it is the responsibility of the API user to remove these FromObjects from the query. Otherwise they will exist in two places: at the top-level and in the JoinObject.

Parameters:
left -
right -
condition -

JoinObject

public JoinObject(FromObject left,
                  FromObject right,
                  java.lang.String type,
                  boolean natural,
                  JoinCondition condition)
Note: If using existing FromObjects for the left or right parameters, it is the responsibility of the API user to remove these FromObjects from the query. Otherwise they will exist in two places: at the top-level and in the JoinObject.

Parameters:
left -
right -
type -
natural -
condition -
Method Detail

getLeftExpression

public FromObject getLeftExpression()

setLeftExpression

public void setLeftExpression(FromObject left)

getRightExpression

public FromObject getRightExpression()

setRightExpression

public void setRightExpression(FromObject right)

getIncludeJoinKeyword

public boolean getIncludeJoinKeyword()

setIncludeJoinKeyword

public void setIncludeJoinKeyword(boolean inc)

getJoinType

public java.lang.String getJoinType()

setJoinType

public void setJoinType(java.lang.String type)

isNatural

public boolean isNatural()

setNatural

public void setNatural(boolean natural)

getCondition

public JoinCondition getCondition()

setCondition

public void setCondition(JoinCondition condition)

getLeftPartitionBy

public ExpressionList getLeftPartitionBy()

setLeftPartitionBy

public void setLeftPartitionBy(ExpressionList leftPartitionBy)

getRightPartitionBy

public ExpressionList getRightPartitionBy()

setRightPartitionBy

public void setRightPartitionBy(ExpressionList rightPartitionBy)

isOuterJoin

public boolean isOuterJoin()
Returns true if this is a FULL, LEFT or RIGHT OUTER JOIN, and false if this is an INNER JOIN.


getSQLText

public java.lang.String getSQLText()
Description copied from interface: SQLFragment
Return the SQL for this fragment. This contains no validation - if the implementation is incomplete it will just return what it has. Error checking of fragments should be done using a SQLQueryBuilder.

Returns:
a string representing the SQL text for this object.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

Copyright © 1997, 2011, Oracle. All rights reserved.