Extension SDK 9.0.5

oracle.jdeveloper.cm.ds.db
Class Index

java.lang.Object
  extended byoracle.jdeveloper.cm.ds.db.AbstractDBObject
      extended byoracle.jdeveloper.cm.ds.db.AbstractSchemaObject
          extended byoracle.jdeveloper.cm.ds.db.Index
All Implemented Interfaces:
Copyable, DBObject, SchemaObject, Subject

public class Index
extends AbstractSchemaObject

Model of a database index.


Field Summary
static java.lang.String TYPE
           
 
Fields inherited from interface oracle.jdeveloper.cm.ds.db.DBObject
COMMENT
 
Fields inherited from interface oracle.ide.addin.Subject
OBJECT_MODIFIED
 
Constructor Summary
Index()
          Constructs a new index.
Index(java.lang.String name, Schema schema, Table table)
          Constructs a new index on the specified table using the specified name and schema
 
Method Summary
 void addColumn(Column col)
          Adds a column to the list of indexed columns.
 java.lang.Object copyTo(java.lang.Object target)
          Copies the state of this DBObject to another instance.
protected  void copyToImpl(Index copy)
           
 boolean equals(java.lang.Object target)
           
protected  boolean equalsImpl(Index target)
           
 Column[] getColumns()
          Retrieves the columns referenced by this index.
 Table getTable()
          Retrieves the table on which this index is defined.
 java.lang.String getType()
          Returns the type of this object.
 void removeColumn(Column col)
          Removes a column from the list of indexed columns
 void setColumns(Column[] cols)
          Sets the columns referenced by this index.
 void setTable(Table table)
          Sets the table on which this index acts.
 
Methods inherited from class oracle.jdeveloper.cm.ds.db.AbstractSchemaObject
copyToImpl, equalsImpl, getSchema, setSchema
 
Methods inherited from class oracle.jdeveloper.cm.ds.db.AbstractDBObject
attach, compareToImpl, copyToImpl, detach, equalsImpl, getID, getName, getProperties, getProperty, hashCode, notifyObservers, setID, setName, setProperties, setProperty, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface oracle.jdeveloper.cm.ds.db.DBObject
getID, getName, getProperties, getProperty, setID, setName, setProperties, setProperty
 
Methods inherited from interface oracle.ide.addin.Subject
attach, detach, notifyObservers
 

Field Detail

TYPE

public static final java.lang.String TYPE
See Also:
Constant Field Values
Constructor Detail

Index

public Index()
Constructs a new index.


Index

public Index(java.lang.String name,
             Schema schema,
             Table table)
Constructs a new index on the specified table using the specified name and schema

Parameters:
name - a string containing the name of the index
schema - the schema in which to create the index
table - the table on which to create the index
Method Detail

copyTo

public java.lang.Object copyTo(java.lang.Object target)
Description copied from interface: DBObject
Copies the state of this DBObject to another instance. If null is specified for the target, a new instance will be created.

The entire state of the object will be copied, with a few exceptions. In particular, any observers registered will NOT be copied. In cases where this instance contains child DBObjects, new instances of those children will be created, and the state copied to them. The copy will thus contain its own unique state; after making the copy, changing one instance will not cause any changes to occur to the copy. The properties will be copied; however, copies will not be made of the values referenced by the properties - thus, the copy will refer to the same instance as the original. Child objects that are copied will still point to the original parent; it is the responsibility of a copied parent to update the parent of copies of its children point to the copy of itself.

The ID associated with this object will not be copied. If the copy is intended to be a temporary copy of this object (to be used in a dialog editing the object for example), then the caller should explicitly set the ID of the copy to be the same as on this object. However, if the new object is intended to exist separately from this object, the caller should ensure that the new object have a different ID from this object.

Parameters:
target - The object to copy to. If target is null, a new instance will be created, and the state will be copied to that object.
Returns:
the copy.

copyToImpl

protected void copyToImpl(Index copy)

equals

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

equalsImpl

protected boolean equalsImpl(Index target)

setTable

public void setTable(Table table)
Sets the table on which this index acts.

Parameters:
table - the table to which this index refers

getTable

public Table getTable()
               throws TransientMarker
Retrieves the table on which this index is defined.

Returns:
the table to which this index refers
Throws:
TransientMarker

setColumns

public void setColumns(Column[] cols)
Sets the columns referenced by this index.

Parameters:
cols - an array containing the columns referenced by this index

getColumns

public Column[] getColumns()
Retrieves the columns referenced by this index.

Returns:
an array containing the columns referenced by this index

addColumn

public void addColumn(Column col)
Adds a column to the list of indexed columns.

Parameters:
col - the column to add

removeColumn

public void removeColumn(Column col)
Removes a column from the list of indexed columns

Parameters:
col - the column to remove.

getType

public java.lang.String getType()
Description copied from interface: DBObject
Returns the type of this object. Valid types include things like tables, views, synonyms, and columns.

Returns:
a string describing the type of object.

Extension SDK

 

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