|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.derby.iapi.sql.dictionary.IndexRowGenerator
This class extends IndexDescriptor for internal use by the DataDictionary.
| Field Summary | |
private ExecutionFactory |
ef
|
(package private) IndexDescriptor |
id
|
| Constructor Summary | |
IndexRowGenerator()
Zero-argument constructor for Formatable interface |
|
IndexRowGenerator(IndexDescriptor indexDescriptor)
Constructor for an IndexRowGeneratorImpl |
|
IndexRowGenerator(java.lang.String indexType,
boolean isUnique,
int[] baseColumnPositions,
boolean[] isAscending,
int numberOfOrderedColumns)
Constructor for an IndexRowGeneratorImpl |
|
| Method Summary | |
int[] |
baseColumnPositions()
Returns an array of column positions in the base table. |
boolean |
equals(java.lang.Object other)
Test for value equality |
private ExecutionFactory |
getExecutionFactory()
|
IndexDescriptor |
getIndexDescriptor()
Get the IndexDescriptor that this IndexRowGenerator is based on. |
void |
getIndexRow(ExecRow baseRow,
RowLocation rowLocation,
ExecIndexRow indexRow,
FormatableBitSet bitSet)
Get an index row for this index given a row from the base table and the RowLocation of the base row. |
ExecIndexRow |
getIndexRowTemplate()
Get a template for the index row, to be used with getIndexRow. |
int |
getKeyColumnPosition(int heapColumnPosition)
Returns the position of a column within the key (1-based). 0 means that the column is not in the key. |
java.lang.Integer |
getKeyColumnPosition(java.lang.Integer heapColumnPosition)
Returns the position of a column within the key (1-based). 0 means that the column is not in the key. |
ExecIndexRow |
getNullIndexRow(ColumnDescriptorList columnList,
RowLocation rowLocation)
Get a NULL Index Row for this index. |
int |
getTypeFormatId()
Get a universally unique identifier for the type of this object. |
int |
hashCode()
|
boolean |
indexChanged(int[] changedColumnIds)
Return true iff a change to a set of columns changes the index for this IndexRowGenerator. |
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. |
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 |
IndexDescriptor id
private ExecutionFactory ef
| Constructor Detail |
public IndexRowGenerator(java.lang.String indexType,
boolean isUnique,
int[] baseColumnPositions,
boolean[] isAscending,
int numberOfOrderedColumns)
indexType - The type of indexisUnique - True means the index is uniquebaseColumnPositions - 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 IndexRowGenerator(IndexDescriptor indexDescriptor)
indexDescriptor - An IndexDescriptor to delegate calls topublic IndexRowGenerator()
| Method Detail |
public ExecIndexRow getIndexRowTemplate()
public void getIndexRow(ExecRow baseRow,
RowLocation rowLocation,
ExecIndexRow indexRow,
FormatableBitSet bitSet)
throws StandardException
baseRow - A row in the base tablerowLocation - The RowLocation of the row in the base tableindexRow - A template for the index row. It must have the
correct number of columns.bitSet - If non-null, then baseRow is a partial row and the
set bits in bitSet represents the column mapping for
the partial row to the complete base row. WARNING:
ONE based!!!
StandardException - Thrown on error
public ExecIndexRow getNullIndexRow(ColumnDescriptorList columnList,
RowLocation rowLocation)
throws StandardException
rowLocation - empty row location.
StandardException - thrown on error.public boolean indexChanged(int[] changedColumnIds)
changedColumnIds - - holds the 1 based column ids for the changed
columns.
public IndexDescriptor getIndexDescriptor()
public boolean isUnique()
IndexDescriptor
isUnique in interface IndexDescriptorIndexDescriptor.isUnique()public int[] baseColumnPositions()
IndexDescriptor
baseColumnPositions in interface IndexDescriptorIndexDescriptor.baseColumnPositions()public java.lang.Integer getKeyColumnPosition(java.lang.Integer heapColumnPosition)
IndexDescriptor
getKeyColumnPosition in interface IndexDescriptorIndexDescriptor.getKeyColumnPosition(java.lang.Integer)public int getKeyColumnPosition(int heapColumnPosition)
IndexDescriptor
getKeyColumnPosition in interface IndexDescriptorIndexDescriptor.getKeyColumnPosition(java.lang.Integer)public int numberOfOrderedColumns()
IndexDescriptor
numberOfOrderedColumns in interface IndexDescriptorIndexDescriptor.numberOfOrderedColumns()public java.lang.String indexType()
IndexDescriptor
indexType in interface IndexDescriptorIndexDescriptor.indexType()public java.lang.String toString()
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 boolean equals(java.lang.Object other)
other - The other indexrowgenerator to compare this one with
public int hashCode()
Object.hashCode()private ExecutionFactory getExecutionFactory()
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.ClassNotFoundException - Thrown on read errorExternalizable.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 errorpublic int getTypeFormatId()
TypedFormat
getTypeFormatId in interface TypedFormat
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||