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

E17493-02

oracle.javatools.db
Class Index

java.lang.Object
  extended by oracle.javatools.db.AbstractDBObject
      extended by oracle.javatools.db.AbstractBuildableObject
          extended by oracle.javatools.db.AbstractSystemObject
              extended by oracle.javatools.db.AbstractSchemaObject
                  extended by oracle.javatools.db.Index
All Implemented Interfaces:
ChildDBObject, DBObject, SchemaObject, SystemObject, Copyable, DynamicPropertySet

public class Index
extends AbstractSchemaObject
implements ChildDBObject

Model of a database index.


Nested Class Summary
static class Index.IndexType
          Index type
 
Nested classes/interfaces inherited from class oracle.javatools.db.AbstractDBObject
AbstractDBObject.ChildSupport, AbstractDBObject.ListenerSupport
 
Field Summary
static java.lang.String TYPE
           
 
Fields inherited from interface oracle.javatools.db.DBObject
COMMENT
 
Constructor Summary
Index()
          Constructs a new index.
Index(java.lang.String name, Schema schema)
          Constructs a new index using the specified name and schema.
Index(java.lang.String name, Schema schema, Table table)
          Constructs a new index on the specified table using the specified name and schema, and adds the index to the table.
Index(java.lang.String name, Table table)
          Constructs a new index on the specified table using the specified name, and adds the index to the table.
 
Method Summary
 void addColumnExpression(IndexObject colExpr)
          Adds a column to the list of indexed columns.
 void addColumnExpression(int posn, IndexObject colExpr)
          Insert a column into the list of indexed columns.
protected  void copyToImpl(AbstractDBObject copy, DBObject copyParent, IDPolicy idPolicy)
          Implementation method for making a copy of this object.
 DBObject findOwnedObject(DBObjectID id)
          Returns a child of this object that has the given ID.
 IndexObject[] getColumnExpressions()
          Retrieves the column expressions referenced by this index.
 DBObjectID getDomainIndextype()
           
 java.lang.String getDomainIndextypeOpStatus()
           
 java.lang.String getDomainIndextypeParameters()
           
 Index.IndexType getIndexType()
          Get the type of the index.
 java.lang.Integer getKeyCompression()
          Gets the key compression.
 int getParallelDegree()
          Return the degree of parallelism (the number of parallel threads used in the parallel operation) where : 0 = PARALLEL DEFAULT (Oracle server selects the degree) 1 = NOPARALLEL (default) n = PARALLEL n
 DBObject getParent()
          Returns the parent of this object, if one exists.
 java.lang.Object getProperty(java.lang.String key)
          Retrieves the value associated with a property.
 Schema getSchema()
          Returns the owning Table's schema or schema set against this index if different.
 java.lang.Boolean getSystemGenerated()
          Gets the System Generated flag.
 Table getTable()
          Retrieves the table on which this index is defined.
 java.lang.String getType()
          Returns the type of this object.
 void removeColumnExpression(IndexObject colExpr)
          Removes a column expression from the list of indexed column expressions
 void setColumnExpressions(IndexObject[] colExprs)
          Sets the column expressions referenced by this index.
 void setDomainIndextype(DBObjectID id)
           
 void setDomainIndextypeOpStatus(java.lang.String status)
           
 void setDomainIndextypeParameters(java.lang.String parameters)
           
 void setIndexType(Index.IndexType indexType)
          Set the type of the index.
 void setKeyCompression(java.lang.Integer keyCompression)
          Sets the key compression.
 void setParallelDegree(int value)
          Set the degree of parallelism (the number of parallel threads used in the parallel operation) where : 0 = PARALLEL DEFAULT (Oracle server selects the degree) 1 = NOPARALLEL (default) n = PARALLEL n
 void setParent(DBObject par)
          Sets the parent of this object.
 void setProperty(java.lang.String key, java.lang.Object value)
          Sets the value for a property.
 void setSchema(Schema s)
          Sets the index's schema.
 void setSystemGenerated(java.lang.Boolean generated)
          Sets the System Generated flag.
 void setTable(Table table)
          Sets the table on which this index acts.
 
Methods inherited from class oracle.javatools.db.AbstractSchemaObject
equalsImpl
 
Methods inherited from class oracle.javatools.db.AbstractSystemObject
addObjectListener, addObjectListener, addObjectListener, fireObjectUpdated, removeObjectListener, removeObjectListener, removeObjectListener
 
Methods inherited from class oracle.javatools.db.AbstractBuildableObject
checkInit, checkInit, getOwnedObjectsImpl, getProperties, getReferenceIDsImpl, needsInitialization
 
Methods inherited from class oracle.javatools.db.AbstractDBObject
changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyTo, equals, 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.DBObject
copyTo, copyTo, copyTo, findOwnedObject, getID, getName, getOwnedObjects, getOwnedObjects, getReferenceIDs, replaceReferenceIDs, setID, setName
 
Methods inherited from interface oracle.javatools.util.DynamicPropertySet
getProperties, getProperty, setProperties
 
Methods inherited from interface oracle.javatools.db.SchemaObject
addObjectListener, removeObjectListener
 
Methods inherited from interface oracle.javatools.db.SystemObject
addObjectListener, addObjectListener, fireObjectUpdated, removeObjectListener, removeObjectListener
 

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,
             Table table)
Constructs a new index on the specified table using the specified name, and adds the index to the table.

Parameters:
name - a string containing the name of the index
table - the table on which to create the index

Index

public Index(java.lang.String name,
             Schema schema)
Constructs a new index 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

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, and adds the index to the table.

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

getIndexType

public Index.IndexType getIndexType()
Get the type of the index. Current types are:

Returns:

getDomainIndextype

public DBObjectID getDomainIndextype()

getDomainIndextypeParameters

public java.lang.String getDomainIndextypeParameters()

getDomainIndextypeOpStatus

public java.lang.String getDomainIndextypeOpStatus()

getParallelDegree

public int getParallelDegree()
Return the degree of parallelism (the number of parallel threads used in the parallel operation) where :


setIndexType

public void setIndexType(Index.IndexType indexType)
Set the type of the index. Current types are:


setDomainIndextype

public void setDomainIndextype(DBObjectID id)

setDomainIndextypeParameters

public void setDomainIndextypeParameters(java.lang.String parameters)

setDomainIndextypeOpStatus

public void setDomainIndextypeOpStatus(java.lang.String status)

setParallelDegree

public void setParallelDegree(int value)
Set the degree of parallelism (the number of parallel threads used in the parallel operation) where :

Parameters:
value -

setKeyCompression

public void setKeyCompression(java.lang.Integer keyCompression)
Sets the key compression.
  1. null - NOCOMPRESS
  2. 0 - COMPRESS
  3. > 0 - COMPRESS integer


getKeyCompression

public java.lang.Integer getKeyCompression()
Gets the key compression.
  1. null - NOCOMPRESS
  2. 0 - COMPRESS
  3. > 0 - COMPRESS integer


setSystemGenerated

public void setSystemGenerated(java.lang.Boolean generated)
Sets the System Generated flag. This flag indicates if the index was generated to support a constraint.


getSystemGenerated

public java.lang.Boolean getSystemGenerated()
Gets the System Generated flag. This flag indicates if the index was generated to support a constraint.


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()
Retrieves the table on which this index is defined.

Returns:
the table to which this index refers

getParent

public DBObject getParent()
Description copied from interface: DBObject
Returns the parent of this object, if one exists. This does not return the Schema for a SchemaObject. Schema's are not considered part of the ownership parent tree.

Specified by:
getParent in interface ChildDBObject
Specified by:
getParent in interface DBObject
Overrides:
getParent in class AbstractSystemObject

setParent

public void setParent(DBObject par)
Description copied from interface: ChildDBObject
Sets the parent of this object.

Specified by:
setParent in interface ChildDBObject

getProperty

public java.lang.Object getProperty(java.lang.String key)
Description copied from interface: DynamicPropertySet
Retrieves the value associated with a property.

Specified by:
getProperty in interface DynamicPropertySet
Overrides:
getProperty in class AbstractSchemaObject
Parameters:
key - the property key for which a value is desired. exists.
Returns:
the value of the requested property, or a null value if the property does not exist or is not set.

setProperty

public void setProperty(java.lang.String key,
                        java.lang.Object value)
Description copied from interface: DynamicPropertySet
Sets the value for a property. Setting a value to null removes that property.

Specified by:
setProperty in interface DynamicPropertySet
Overrides:
setProperty in class AbstractSchemaObject
Parameters:
key - the property key to set
value - the value to set

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.

Specified by:
getType in interface DBObject
Returns:
a string describing the type of object.

setColumnExpressions

public void setColumnExpressions(IndexObject[] colExprs)
Sets the column expressions referenced by this index.

Parameters:
colExprs - an array containing the column expressions referenced by this index

getColumnExpressions

public IndexObject[] getColumnExpressions()
Retrieves the column expressions referenced by this index.

Returns:
an array containing the column expressions referenced by this index

addColumnExpression

public void addColumnExpression(IndexObject colExpr)
Adds a column to the list of indexed columns.

Parameters:
colExpr - the IndexObject to add

addColumnExpression

public void addColumnExpression(int posn,
                                IndexObject colExpr)
Insert a column into the list of indexed columns.

Parameters:
posn - the position of the new IndexObject
colExpr - the IndexObject to add

removeColumnExpression

public void removeColumnExpression(IndexObject colExpr)
Removes a column expression from the list of indexed column expressions

Parameters:
colExpr - the column expression to remove.

findOwnedObject

public DBObject findOwnedObject(DBObjectID id)
Description copied from class: AbstractDBObject
Returns a child of this object that has the given ID. The child is located by comparing IDs, not by calling resolveID() which is quicker. The method does not recurse to look for children of children. This method is a candidate for adding to the DBObject interface.

Specified by:
findOwnedObject in interface DBObject
Overrides:
findOwnedObject in class AbstractDBObject
Parameters:
id - the id to look for
Returns:
a child object found with that id.

getSchema

public Schema getSchema()
Returns the owning Table's schema or schema set against this index if different.

Specified by:
getSchema in interface SchemaObject
Overrides:
getSchema in class AbstractSchemaObject
Returns:
schema the Schema containing this object

setSchema

public void setSchema(Schema s)
Sets the index's schema. The schema is only remembered against the index if it is different to the owning table's schema.

Specified by:
setSchema in interface SchemaObject
Overrides:
setSchema in class AbstractSchemaObject
Parameters:
s - the Schema containing this object

copyToImpl

protected void copyToImpl(AbstractDBObject copy,
                          DBObject copyParent,
                          IDPolicy idPolicy)
Description copied from class: AbstractDBObject
Implementation method for making a copy of this object. To add custom copyTo logic, a subclass must override this method (exactly), and must call back to the super implementation.

Overrides:
copyToImpl in class AbstractSchemaObject
Parameters:
copy - the copy being created of this object
copyParent - if this object is being copied underneath a parent, this parameter is the copy of the parent of this object, which will therefore need to be the parent of the copy of this object.
idPolicy - the policy for copying the object's ID.

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.