|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A SortObserver is an object that is used as a callback by the sorter. It allows the sort client to do whatever they want from the context of a sort. It contains 2 callback methods: insertDuplicateKey() and insertNonDuplicateKey(). On each SortController.insert(), one or the other of these methods will be called, depending on whether the given row has a key that has been seen before or not.
Some sample uses include:
SortController
Method Summary | |
void |
addToFreeList(DataValueDescriptor[] objectArray,
int maxFreeListSize)
|
DataValueDescriptor[] |
getArrayClone()
|
DataValueDescriptor[] |
insertDuplicateKey(DataValueDescriptor[] insertRow,
DataValueDescriptor[] existingRow)
Called prior to inserting a duplicate sort key. |
DataValueDescriptor[] |
insertNonDuplicateKey(DataValueDescriptor[] insertRow)
Called prior to inserting a distinct sort key; in other words, the first time that a key is inserted into the sorter, this method is called. |
Method Detail |
public DataValueDescriptor[] insertNonDuplicateKey(DataValueDescriptor[] insertRow) throws StandardException
This method will most commonly be used to clone the row that is retained by the sorter, or possibly to do some initialization of that row.
insertRow
- the current row that the sorter
is on the verge of retaining
StandardException
- either on unexpected exception,
or on expected user error that is to percolate back
to the driver of the sort.public DataValueDescriptor[] insertDuplicateKey(DataValueDescriptor[] insertRow, DataValueDescriptor[] existingRow) throws StandardException
insertRow
- the current row that the sorter
is on the verge of retaining. It is a duplicate
of existingRow.existingRow
- the row that is already in the
the sorter which is a duplicate of insertRow
StandardException
- either on unexpected exception,
or on expected user error that is to percolate back
to the driver of the sort.public void addToFreeList(DataValueDescriptor[] objectArray, int maxFreeListSize)
public DataValueDescriptor[] getArrayClone() throws StandardException
StandardException
|
Built on Mon 2007-06-04 09:58:47+0400, from revision ??? | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |