|
|||||||||
| Home >> All >> org >> apache >> derbyTesting >> unitTests >> [ store overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.derbyTesting.unitTests.store
Class T_SecondaryIndexRow

java.lang.Objectorg.apache.derbyTesting.unitTests.store.T_SecondaryIndexRow
- public class T_SecondaryIndexRow
- extends java.lang.Object
This class implements a row which will be stored in a secondary index on a heap table.
This class creates a new DataValueDescriptor array which will be the row used to insert into the secondary index. The fields of this object array are made up of references to DataValueDescriptors provided by the caller: the DataValueDescriptors in the template and a RowLocation. The interface is designed to support the standard access method interface where callers provide a single template and then read rows into that template over and over. This class keeps a reference to the objects in the template and the rowlocation, so the state of this object changes whenever the caller changes the template. The caller provides a template which will contain a heap row, and a RowLocation which provides the location of the row within the heap table.
So for example to create an index from a base table by reading the base table and inserting each row one at a time into the secondary index you would do something like: DataValueDescriptors[] template = get_template_for_base_table(); RowLocation rowloc = ScanController_var.newRowLocationTemplate(); T_SecondaryIndexRow indrow = new T_SecondaryIndexRow(); indrow.init(template, rowloc, numcols_in_index); while (ScanController_variable.next()) { fetch(template) fetchLocation(rowloc) ConglomerateController_on_btree.insert(indrow.getRow()); }
| Field Summary | |
(package private) org.apache.derby.iapi.types.RowLocation |
init_rowlocation
|
(package private) org.apache.derby.iapi.types.DataValueDescriptor[] |
row
|
| Constructor Summary | |
T_SecondaryIndexRow()
|
|
| Method Summary | |
org.apache.derby.iapi.types.DataValueDescriptor[] |
getRow()
Return the secondary index row. |
void |
init(org.apache.derby.iapi.types.DataValueDescriptor[] template,
org.apache.derby.iapi.types.RowLocation rowlocation,
int numkeys)
Initialize the class. |
java.lang.String |
toString()
Convert this Object to a human-readable String. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
row
org.apache.derby.iapi.types.DataValueDescriptor[] row
init_rowlocation
org.apache.derby.iapi.types.RowLocation init_rowlocation
| Constructor Detail |
T_SecondaryIndexRow
public T_SecondaryIndexRow()
| Method Detail |
init
public void init(org.apache.derby.iapi.types.DataValueDescriptor[] template, org.apache.derby.iapi.types.RowLocation rowlocation, int numkeys) throws org.apache.derby.iapi.error.StandardException
- Initialize the class.
Save away pointers to the base table template row, and the rowlocation class. Build default map of base columns to key columns, this map can be changed with setMap().
getRow
public org.apache.derby.iapi.types.DataValueDescriptor[] getRow()
- Return the secondary index row.
Return the DataValueDescriptor array that represents the branch row, for use in raw store calls to fetch, insert, and update.
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object - Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string concatenation with this object. If the result is
null, string concatenation will instead use"null".The default implementation returns
getClass().getName() + "@" + Integer.toHexString(hashCode()).
|
|||||||||
| Home >> All >> org >> apache >> derbyTesting >> unitTests >> [ store overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.apache.derbyTesting.unitTests.store.T_SecondaryIndexRow