Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

oracle.javatools.db.sql
Class ColumnUsage

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.AbstractFromObjectUsage
                  extended by oracle.javatools.db.sql.AbstractDBObjectUsage
                      extended by oracle.javatools.db.sql.ColumnUsage
All Implemented Interfaces:
ChildDBObject, DBObject, ProviderUsage, DBObjectUsage, FromObjectUsage, SQLFragment, Copyable, DynamicPropertySet

public class ColumnUsage
extends AbstractDBObjectUsage

SQL fragment that is a use of a Column. Used as a child of SelectObject or WhereObject.

Since:
10.1.3

Nested Class Summary
 
Nested classes/interfaces inherited from class oracle.javatools.db.AbstractDBObject
AbstractDBObject.ChildSupport
 
Field Summary
 
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, NOCYCLE, ORDERBY, SELECT, STARTWITH, TYPE, WHERE
 
Fields inherited from interface oracle.javatools.db.DBObject
COMMENT
 
Constructor Summary
ColumnUsage()
          Create an empty ColumnUsage.
ColumnUsage(DBObjectID colID)
          Create a ColumnUsage using the given Column ID to reference.
ColumnUsage(DBObjectID colID, FromObject from)
          Create a ColumnUsage using the given Column ID and FromObject to reference.
 
Method Summary
 DBObject copyTo(DBObject target, DBObject copyParent, IDPolicy idPolicy)
          Internal copy method used by the API to perform copy operations.
protected  void copyToImpl(ColumnUsage target, DBObject copyParent, IDPolicy idPolicy)
           
 boolean equals(java.lang.Object obj)
           
protected  boolean equalsImpl(ColumnUsage other)
           
 java.lang.String[] getAttributes()
          Gets the list of attributes used.
 java.lang.String getSQLText()
          Returns the SQLText for the ColumnUsage.
 boolean isOuterJoin()
          Returns true if this column usage includes the outer join syntax for a where clause.
 void setAlwaysQuote(boolean boo)
           
 void setAttributes(java.lang.String[] attrs)
          Sets the list of attributes used (if any).
 void setColumnID(DBObjectID colID)
           
 void setOuterJoin(boolean oj)
          Sets whether this column usage contains the where clause syntax for an outer join.
 
Methods inherited from class oracle.javatools.db.sql.AbstractDBObjectUsage
copyToImpl, equalsImpl, getColumnName, getExternalName, getObjectID, getProvider, getReferenceIDsImpl, replaceReferenceIDs, setObjectID, setProvider
 
Methods inherited from class oracle.javatools.db.sql.AbstractFromObjectUsage
copyToImpl, equalsImpl, getFromObject, getFromObjectID, getSQLTextImpl, isQualified, resolveFromObject, resolveFromObject, setFromObject, setFromObjectID, setQualified
 
Methods inherited from class oracle.javatools.db.sql.AbstractSQLFragment
appendToBuffer, argsToString, getTextOrNull, getTextOrNull, getType, setParent, surroundWithBrackets, surroundWithBrackets, toString
 
Methods inherited from class oracle.javatools.db.AbstractChildDBObject
copyToImpl, findParent, getParent
 
Methods inherited from class oracle.javatools.db.AbstractDBObject
changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyToImpl, equalsImpl, findOwnedObject, findOwnedObject, findOwnedObject, getChildSupport, getID, getName, getOwnedObjects, getOwnedObjects, getOwnedObjectsImpl, getProperties, getProperty, getProperty, getReferenceIDs, hashCode, includeOwnedObject, includesType, includesType, removeThisAsParent, setID, setName, setProperties, setProperty
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.javatools.db.ChildDBObject
getParent, setParent
 
Methods inherited from interface oracle.javatools.db.DBObject
copyTo, copyTo, copyTo, findOwnedObject, findOwnedObject, getID, getName, getOwnedObjects, getOwnedObjects, getReferenceIDs, getType, setID, setName
 
Methods inherited from interface oracle.javatools.util.DynamicPropertySet
getProperties, getProperty, getProperty, setProperties, setProperty
 

Constructor Detail

ColumnUsage

public ColumnUsage()
Create an empty ColumnUsage.


ColumnUsage

public ColumnUsage(DBObjectID colID)
Create a ColumnUsage using the given Column ID to reference.


ColumnUsage

public ColumnUsage(DBObjectID colID,
                   FromObject from)
Create a ColumnUsage using the given Column ID and FromObject to reference.

Method Detail

setColumnID

public void setColumnID(DBObjectID colID)

getAttributes

public java.lang.String[] getAttributes()
Gets the list of attributes used. If the Column used has an object type datatype then it is possible to reference an attribute of that object type in the query directly. Furthermore if that attribute has an object type datatype we can recurse. The attribute list is currently returned as a String[] but we may move to a DBObjectID[] in the next release.


setAttributes

public void setAttributes(java.lang.String[] attrs)
Sets the list of attributes used (if any).

See Also:
getAttributes()

setOuterJoin

public void setOuterJoin(boolean oj)
Sets whether this column usage contains the where clause syntax for an outer join.


isOuterJoin

public boolean isOuterJoin()
Returns true if this column usage includes the outer join syntax for a where clause.


getSQLText

public java.lang.String getSQLText()
Returns the SQLText for the ColumnUsage. It uses the alias, or if not present the sql expression, for the FromObject, dot, the Column name.

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

copyTo

public DBObject copyTo(DBObject target,
                       DBObject copyParent,
                       IDPolicy idPolicy)
Description copied from class: AbstractDBObject
Internal copy method used by the API to perform copy operations. All objects must implement this method if they are instantiable objects. Abstract objects (e.g. Relation) must NOT implement this method. The implementation should delegate to the copyToImpl method to copy the actual properties.

This method does not fix internal reference ids on copy. That is done by the calling DBObject.copyTo(DBObject, IDPolicy) method.

Specified by:
copyTo in class AbstractDBObject
See Also:
DBObject.copyTo(java.lang.Object), DBObject.copyTo(DBObject, boolean), AbstractDBObject.copyToImpl(oracle.javatools.db.AbstractDBObject, oracle.javatools.db.DBObject, oracle.javatools.db.IDPolicy)

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

equalsImpl

protected boolean equalsImpl(ColumnUsage other)

copyToImpl

protected void copyToImpl(ColumnUsage target,
                          DBObject copyParent,
                          IDPolicy idPolicy)

setAlwaysQuote

public void setAlwaysQuote(boolean boo)

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

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