public class Index extends AbstractSchemaObject implements ChildDBObject
Modifier and Type | Class and Description |
---|---|
static class |
Index.IndexType
Index type
|
AbstractDBObject.ChildSupport, AbstractDBObject.ListenerSupport
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TYPE |
Constructor and Description |
---|
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
The Index will not be added to the Table, that must be done separately
when the Index definition is complete.
|
Index(java.lang.String name,
Table table)
Constructs a new index on the specified table using the specified name.
|
Modifier and Type | Method and Description |
---|---|
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,
boolean strict)
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.
|
java.lang.Integer |
getParallelDegree()
Return the degree of parallelism (the number of parallel threads used in
the parallel operation) where :
null = no parallelism defined
0 = PARALLEL DEFAULT (Oracle server selects the degree)
1 = NOPARALLEL (default)
n = PARALLEL n
|
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(java.lang.Integer value)
Set the degree of parallelism (the number of parallel threads used in the
parallel operation) where :
null = no parallelism defined
0 = PARALLEL DEFAULT (Oracle server selects the degree)
1 = NOPARALLEL (default)
n = PARALLEL n
|
void |
setParent(DBObject par)
Sets the parent Table of this Index.
|
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.
|
checkInit, checkInit, getOwnedObjectsImpl, getProperties, getReferenceIDsImpl, needsInitialization
addObjectListener, addObjectListener, addObjectListener, changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyTo, equals, equalsImpl, findOwnedObject, findOwnedObject, findOwnedObject, findParent, fireObjectUpdated, firePropertyChanged, getChildSupport, getID, getName, getOwnedObjects, getOwnedObjects, getParent, getProperty, getReferenceIDs, hashCode, includeOwnedObject, includesType, includesType, removeObjectListener, removeObjectListener, removeObjectListener, removeOwnedObject, removeThisAsParent, replaceReferenceIDs, setID, setName, setProperties, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getParent
addObjectListener, copyTo, copyTo, copyTo, equals, findOwnedObject, findOwnedObject, getID, getName, getOwnedObjects, getOwnedObjects, getProperties, getReferenceIDs, hashCode, removeObjectListener, removeOwnedObject, replaceReferenceIDs, setID, setName
getProperty, setProperties
addObjectListener, removeObjectListener
addObjectListener, fireObjectUpdated, removeObjectListener
public static final java.lang.String TYPE
public Index()
public Index(java.lang.String name, Table table)
name
- a string containing the name of the indextable
- the table on which to create the indexpublic Index(java.lang.String name, Schema schema)
name
- a string containing the name of the indexschema
- the schema in which to create the indexpublic Index(java.lang.String name, Schema schema, Table table)
name
- a string containing the name of the indexschema
- the schema in which to create the indextable
- the table on which to create the indexpublic Index.IndexType getIndexType()
public DBObjectID getDomainIndextype()
public java.lang.String getDomainIndextypeParameters()
public java.lang.String getDomainIndextypeOpStatus()
public void setParallelDegree(java.lang.Integer value)
value
- public java.lang.Integer getParallelDegree()
public void setIndexType(Index.IndexType indexType)
public void setDomainIndextype(DBObjectID id)
public void setDomainIndextypeParameters(java.lang.String parameters)
public void setDomainIndextypeOpStatus(java.lang.String status)
public void setKeyCompression(java.lang.Integer keyCompression)
null
- NOCOMPRESS0
- COMPRESS> 0
- COMPRESS integerpublic java.lang.Integer getKeyCompression()
null
- NOCOMPRESS0
- COMPRESS> 0
- COMPRESS integerpublic void setSystemGenerated(java.lang.Boolean generated)
public java.lang.Boolean getSystemGenerated()
public void setTable(Table table)
table
- the table to which this index referspublic Table getTable()
AbstractDBObject.getParent()
which will simply
return the current parent of this object without building anything.public void setParent(DBObject par)
setParent
in interface ChildDBObject
par
- the Table that this Index is on.public java.lang.Object getProperty(java.lang.String key)
DynamicPropertySet
getProperty
in interface DynamicPropertySet
getProperty
in class AbstractDBObject
key
- the property key for which a value is desired.
exists.null
value
if the property does not exist or is not set.public void setProperty(java.lang.String key, java.lang.Object value)
DynamicPropertySet
null
removes that property.setProperty
in interface DynamicPropertySet
setProperty
in class AbstractDBObject
key
- the property key to setvalue
- the value to setpublic java.lang.String getType()
DBObject
public void setColumnExpressions(IndexObject[] colExprs)
colExprs
- an array containing the column expressions
referenced by this indexpublic IndexObject[] getColumnExpressions()
public void addColumnExpression(IndexObject colExpr)
colExpr
- the IndexObject to addpublic void addColumnExpression(int posn, IndexObject colExpr)
posn
- the position of the new IndexObjectcolExpr
- the IndexObject to addpublic void removeColumnExpression(IndexObject colExpr)
colExpr
- the column expression to remove.public DBObject findOwnedObject(DBObjectID id, boolean strict)
DBObject
Note: an unstrict comparison can be time consuming, only request it if you need it (i.e. you are searching using a DBObjectID that did not originate in this object's heirarchy).
The method does not recurse to look for children of children.
This will not find SchemaObjects in a Schema, as in the API the Schema -> SchemaObject relationship is not an owner -> owned object relationship.
findOwnedObject
in interface DBObject
findOwnedObject
in class AbstractDBObject
id
- the id to look forstrict
- whether to stricly compare IDs or notDBObjectID.equals(DBObjectID,boolean)
public Schema getSchema()
getSchema
in interface SchemaObject
getSchema
in class AbstractSchemaObject
public void setSchema(Schema s)
setSchema
in interface SchemaObject
setSchema
in class AbstractSchemaObject
s
- the Schema containing this objectprotected void copyToImpl(AbstractDBObject copy, DBObject copyParent, IDPolicy idPolicy)
AbstractDBObject
copyToImpl
in class AbstractBuildableObject
copy
- the copy being created of this objectcopyParent
- 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.