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.
|
java.lang.Boolean |
getReverse()
Determines if the index is stored in reverse or not.
|
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 |
setReverse(java.lang.Boolean reverse)
Set whether the index should be stored in reverse or not.
|
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, processPropertyChange, setIDaddObjectListener, addObjectListener, addObjectListener, changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyTo, equals, equalsImpl, findOwnedObject, findOwnedObject, findOwnedObject, findParent, fireObjectUpdated, firePropertyChanged, getChildSupport, getChildSupport, getID, getName, getOwnedObjects, getOwnedObjects, getParent, getProperty, getReferenceIDs, hashCode, includeOwnedObject, includesType, includesType, removeObjectListener, removeObjectListener, removeObjectListener, removeOwnedObject, removeThisAsParent, replaceReferenceIDs, setName, setProperties, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetParentaddObjectListener, copyTo, copyTo, copyTo, equals, findOwnedObject, findOwnedObject, getID, getName, getOwnedObjects, getOwnedObjects, getProperties, getProperty, getReferenceIDs, hashCode, removeObjectListener, removeOwnedObject, replaceReferenceIDs, setID, setName, setPropertiesaddObjectListener, removeObjectListeneraddObjectListener, fireObjectUpdated, removeObjectListenerpublic 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 java.lang.Boolean getReverse()
null - not specifiedtrue - REVERSEfalse - NOREVERSEpublic void setReverse(java.lang.Boolean reverse)
null - not specifiedtrue - REVERSEfalse - NOREVERSEreverse - value to set for reverse statepublic 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 ChildDBObjectpar - the Table that this Index is on.public java.lang.Object getProperty(java.lang.String key)
DBObjectobj.getProperty( "name" ) == obj.getName()Both bean and extended property names are available as constants on the
Property class for properties that
the db-api supports natively.getProperty in interface DBObjectgetProperty in class AbstractDBObjectkey - 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)
DBObjectnull removes
that property.setProperty in interface DBObjectsetProperty in class AbstractDBObjectkey - the property key to setvalue - the value to setpublic java.lang.String getType()
DBObjectpublic 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)
DBObjectNote: 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 DBObjectfindOwnedObject in class AbstractDBObjectid - the id to look forstrict - whether to stricly compare IDs or notDBObjectID.equals(DBObjectID,boolean)public Schema getSchema()
getSchema in interface SchemaObjectgetSchema in class AbstractSchemaObjectpublic void setSchema(Schema s)
setSchema in interface SchemaObjectsetSchema in class AbstractSchemaObjects - the Schema containing this objectprotected void copyToImpl(AbstractDBObject copy, DBObject copyParent, IDPolicy idPolicy)
AbstractDBObjectcopyToImpl in class AbstractBuildableObjectcopy - 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.