|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.derby.catalog.types.IndexDescriptorImpl
public class IndexDescriptorImpl
IndexRowGenerator,
Serialized Form| Field Summary | |
|---|---|
private int[] |
baseColumnPositions
|
private java.lang.String |
indexType
|
private boolean[] |
isAscending
|
private boolean |
isUnique
This class implements Formatable. |
private boolean |
isUniqueWithDuplicateNulls
|
private int |
numberOfOrderedColumns
|
| Constructor Summary | |
|---|---|
IndexDescriptorImpl()
Zero-argument constructor for Formatable interface |
|
IndexDescriptorImpl(java.lang.String indexType,
boolean isUnique,
boolean isUniqueWithDuplicateNulls,
int[] baseColumnPositions,
boolean[] isAscending,
int numberOfOrderedColumns)
Constructor for an IndexDescriptorImpl |
|
| Method Summary | |
|---|---|
int[] |
baseColumnPositions()
Returns an array of column positions in the base table. |
boolean |
equals(java.lang.Object other)
Test for value equality |
int |
getKeyColumnPosition(int heapColumnPosition)
Returns the postion of a column. |
int |
getTypeFormatId()
Get a universally unique identifier for the type of this object. |
int |
hashCode()
|
java.lang.String |
indexType()
Returns the type of the index. |
boolean[] |
isAscending()
Returns array of boolean telling asc/desc info for each index key column for convenience of using together with baseColumnPositions method. |
boolean |
isAscending(java.lang.Integer keyColumnPosition)
Returns true if the specified column is ascending in the index (1-based). |
boolean |
isDescending(java.lang.Integer keyColumnPosition)
Returns true if the specified column is descending in the index (1-based). |
boolean |
isUnique()
Returns true if the index is unique. |
boolean |
isUniqueWithDuplicateNulls()
Returns true if the index is duplicate keys only for null key parts. |
int |
numberOfOrderedColumns()
Returns the number of ordered columns. |
void |
readExternal(java.io.ObjectInput in)
|
void |
setBaseColumnPositions(int[] baseColumnPositions)
set the baseColumnPositions field of the index descriptor. |
void |
setIsAscending(boolean[] isAscending)
set the isAscending field of the index descriptor. |
void |
setNumberOfOrderedColumns(int numberOfOrderedColumns)
set the numberOfOrderedColumns field of the index descriptor. |
java.lang.String |
toString()
|
void |
writeExternal(java.io.ObjectOutput out)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private boolean isUnique
private int[] baseColumnPositions
private boolean[] isAscending
private int numberOfOrderedColumns
private java.lang.String indexType
private boolean isUniqueWithDuplicateNulls
| Constructor Detail |
|---|
public IndexDescriptorImpl(java.lang.String indexType,
boolean isUnique,
boolean isUniqueWithDuplicateNulls,
int[] baseColumnPositions,
boolean[] isAscending,
int numberOfOrderedColumns)
indexType - The type of indexisUnique - True means the index is uniqueisUniqueWithDuplicateNulls - True means the index will be unique
for non null values but duplicate nulls
will be allowed.
This parameter has no effect if the isUnique
is true. If isUnique is false and
isUniqueWithDuplicateNulls is set to true the
index will allow duplicate nulls but for
non null keys will act like a unique index.baseColumnPositions - An array of column positions in the base
table. Each index column corresponds to a
column position in the base table.isAscending - An array of booleans telling asc/desc on each
column.numberOfOrderedColumns - In the future, it will be possible
to store non-ordered columns in an
index. These will be useful for
covered queries.public IndexDescriptorImpl()
| Method Detail |
|---|
public boolean isUniqueWithDuplicateNulls()
IndexDescriptor
isUniqueWithDuplicateNulls in interface IndexDescriptorIndexDescriptor.isUniqueWithDuplicateNulls()public boolean isUnique()
IndexDescriptor
isUnique in interface IndexDescriptorIndexDescriptor.isUnique()public int[] baseColumnPositions()
IndexDescriptor
baseColumnPositions in interface IndexDescriptorIndexDescriptor.baseColumnPositions()public int getKeyColumnPosition(int heapColumnPosition)
IndexDescriptorReturns the position of a column within the key (1-based). 0 means that the column is not in the key. Same as the above method, but it uses int instead of Integer.
getKeyColumnPosition in interface IndexDescriptorIndexDescriptor.getKeyColumnPosition(int)public int numberOfOrderedColumns()
IndexDescriptorIn the future, it will be possible to store non-ordered columns in an index. These will be useful for covered queries. The ordered columns will be at the beginning of the index row, and they will be followed by the non-ordered columns. For now, all columns in an index must be ordered.
numberOfOrderedColumns in interface IndexDescriptorIndexDescriptor.numberOfOrderedColumns()public java.lang.String indexType()
IndexDescriptor
indexType in interface IndexDescriptorIndexDescriptor.indexType()public boolean isAscending(java.lang.Integer keyColumnPosition)
IndexDescriptor
isAscending in interface IndexDescriptorIndexDescriptor.isAscending()public boolean isDescending(java.lang.Integer keyColumnPosition)
IndexDescriptor
isDescending in interface IndexDescriptorIndexDescriptor.isDescending(java.lang.Integer)public boolean[] isAscending()
IndexDescriptor
isAscending in interface IndexDescriptorIndexDescriptor.isAscending()public void setBaseColumnPositions(int[] baseColumnPositions)
IndexDescriptor
setBaseColumnPositions in interface IndexDescriptorIndexDescriptor.setBaseColumnPositions(int[])public void setIsAscending(boolean[] isAscending)
IndexDescriptor
setIsAscending in interface IndexDescriptorIndexDescriptor.setIsAscending(boolean[])public void setNumberOfOrderedColumns(int numberOfOrderedColumns)
IndexDescriptor
setNumberOfOrderedColumns in interface IndexDescriptorIndexDescriptor.setNumberOfOrderedColumns(int)public java.lang.String toString()
toString in class java.lang.Object
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOException - Thrown on read error
java.lang.ClassNotFoundExceptionExternalizable.readExternal(java.io.ObjectInput)
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOException - Thrown on write errorExternalizable.writeExternal(java.io.ObjectOutput)public int getTypeFormatId()
TypedFormat
getTypeFormatId in interface TypedFormatpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectother - The other indexrowgenerator to compare this one with
public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()
|
Built on Wed 2013-06-12 15:21:56+0000, from revision ??? | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||