| 
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.4.0) E13403-05  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectoracle.javatools.db.AbstractDBObject
oracle.javatools.db.AbstractBuildableObject
oracle.javatools.db.AbstractSystemObject
oracle.javatools.db.AbstractSchemaObject
oracle.javatools.db.Relation
public abstract class Relation
A Relation represents the basic entity of a relational
 database. Examples of relations include tables and views.
 
 A Relation contains a list of Columns and a list of
 Constraints on the values for the columns in the Relation.
 Column and Constraint instances are managed by Relation instances; making
 a copy of a Relation imples making a copy of each Column and Constraint
 contained within the Relation.
 
| Nested Class Summary | 
|---|
| Nested classes/interfaces inherited from class oracle.javatools.db.AbstractDBObject | 
|---|
AbstractDBObject.ChildSupport | 
| Field Summary | 
|---|
| Fields inherited from class oracle.javatools.db.AbstractSystemObject | 
|---|
m_listeners | 
| Fields inherited from interface oracle.javatools.db.DBObject | 
|---|
COMMENT | 
| Constructor Summary | |
|---|---|
protected  | 
Relation()
Constructs a new Relation.  | 
protected  | 
Relation(java.lang.String name,
         Schema schema)
Constructs a new Relation with the specified name in the specified schema.  | 
| Method Summary | |
|---|---|
 void | 
addColumn(Column col)
Adds one column to this relation.  | 
 void | 
addColumn(int index,
          Column col)
Adds one column to this relation at the given index.  | 
 void | 
addConstraint(Constraint constraint)
Adds a Constraint to this relation.  | 
 Column | 
getColumn(java.lang.String name)
Retrieves one column by name.  | 
 Column[] | 
getColumns()
Retrieves the list of columns contained in this relation.  | 
 Constraint | 
getConstraint(java.lang.String name)
Retrieves a Constraint by name.  | 
 Constraint[] | 
getConstraints()
Retrieves the list of constraints on this relation.  | 
protected  void | 
getOwnedObjectsImpl(java.util.Collection<DBObject> c,
                    java.lang.String... types)
Implementation first checks that the object has been built - then returns the collection from suprt.getOwnedObjectsImpl().  | 
 void | 
removeColumn(Column col)
Removes a column from this relation.  | 
 void | 
removeConstraint(Constraint constraint)
Removes a Constraint from this relation.  | 
 void | 
setColumns(Column[] newCols)
Sets the entire list of columns, replacing any that have previously been added.  | 
 void | 
setConstraints(Constraint[] constraints)
Sets the list of constraints on this relation.  | 
| Methods inherited from class oracle.javatools.db.AbstractSchemaObject | 
|---|
addObjectListener, copyToImpl, equalsImpl, getProperty, getSchema, removeObjectListener, setProperty, setSchema | 
| Methods inherited from class oracle.javatools.db.AbstractSystemObject | 
|---|
addObjectListener, fireObjectUpdated, getParent, removeObjectListener | 
| Methods inherited from class oracle.javatools.db.AbstractBuildableObject | 
|---|
checkInit, checkInit, getProperties, getReferenceIDsImpl, needsInitialization | 
| Methods inherited from class oracle.javatools.db.AbstractDBObject | 
|---|
changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyTo, equals, findOwnedObject, findOwnedObject, findOwnedObject, getChildSupport, getID, getName, getOwnedObjects, getOwnedObjects, getProperty, getReferenceIDs, hashCode, includeOwnedObject, includesType, includesType, removeThisAsParent, replaceReferenceIDs, setID, setName, setProperties, toString | 
| Methods inherited from class java.lang.Object | 
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Methods inherited from interface oracle.javatools.db.SystemObject | 
|---|
addObjectListener, fireObjectUpdated, removeObjectListener | 
| Methods inherited from interface oracle.javatools.db.DBObject | 
|---|
copyTo, copyTo, copyTo, findOwnedObject, findOwnedObject, getID, getName, getOwnedObjects, getOwnedObjects, getParent, getReferenceIDs, getType, replaceReferenceIDs, setID, setName | 
| Methods inherited from interface oracle.javatools.util.DynamicPropertySet | 
|---|
getProperties, getProperty, setProperties | 
| Constructor Detail | 
|---|
protected Relation()
protected Relation(java.lang.String name,
                   Schema schema)
name - a string containing the name of the new relationschema - the schema containing the new relation| Method Detail | 
|---|
public void setColumns(Column[] newCols)
newCols - an array containing the new list of columnspublic Column[] getColumns()
public void addColumn(Column col)
col - the new column to add
public void addColumn(int index,
                      Column col)
index - the index to add the new column atcol - the new column to addpublic Column getColumn(java.lang.String name)
a - string containing the desired column
nullpublic void removeColumn(Column col)
col - the column to removepublic Constraint[] getConstraints()
public void setConstraints(Constraint[] constraints)
constraints - an array containing the list of constraintspublic Constraint getConstraint(java.lang.String name)
name - a string containing the name of the constraint
null if
         no constraint of that name exists in this relationpublic void addConstraint(Constraint constraint)
constraint - the constraint to addpublic void removeConstraint(Constraint constraint)
constraint - the constraint to remove
protected void getOwnedObjectsImpl(java.util.Collection<DBObject> c,
                                   java.lang.String... types)
AbstractBuildableObject
getOwnedObjectsImpl in class AbstractBuildableObjectc - a Collection of the apppropriate children.types - a vararg of the type(s) to search forAbstractDBObject.includesType(java.lang.String, java.lang.String...)
  | 
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.4.0) E13403-05  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||