Top Description Fields Constructors Methods
org.apache.derby.impl.store.access.sort

public abstract Class SortScan

extends Scan
Class Inheritance
Known Direct Subclasses
org.apache.derby.impl.store.access.sort.MergeScan, org.apache.derby.impl.store.access.sort.SortBufferScan
Imports
org.apache.derby.shared.common.reference.SQLState, org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.shared.common.error.StandardException, org.apache.derby.iapi.store.access.conglomerate.TransactionManager, org.apache.derby.iapi.types.DataValueDescriptor

Abstract base class for merge sort scans.

Field Summary

Modifier and TypeField and Description
protected DataValueDescriptor[]
current

The row at the current position of the scan, from which fetch will return values.

protected boolean
hold

The row at the current position of the scan, from which fetch will return values.

protected MergeSort
sort

The sort that this class is scanning.

protected TransactionManager
tran

The transactionManager that opened this scan.

Constructor Summary

AccessConstructor and Description
pack-priv
SortScan(MergeSort sort, TransactionManager tran, boolean hold)

Method Summary

Modifier and TypeMethod and Description
public void
public final void
fetch(DataValueDescriptor[]
The row into which the value of the current position in the scan is to be stored.
result
)

Implements org.apache.derby.iapi.store.access.ScanController.fetch.

Fetch the row at the current position of the Scan.

public final boolean

Returns:

True if there is a next position in the scan, false if there isn't.
fetchNext
(DataValueDescriptor[]
The template row into which the value of the next position in the scan is to be stored.
row
)

Implements org.apache.derby.iapi.store.access.ScanController.fetchNext.

Fetch the row at the next position of the Scan.

public final void
fetchWithoutQualify(DataValueDescriptor[]
The row into which the value of the current position in the scan is to be stored.
result
)

Implements org.apache.derby.iapi.store.access.ScanController.fetchWithoutQualify.

Fetch the row at the current position of the Scan and does not apply the qualifiers.

Inherited from org.apache.derby.impl.store.access.sort.Scan:
deletedidNotQualifydoesCurrentPositionQualifyfetchLocationfetchNextGroupfetchNextGroupfetchSetgetAllScanInfogetEstimatedRowCountgetScanInfoisCurrentPositionDeletedisHeldAfterCommitisKeyedisTableLockednewRowLocationTemplatepositionAtRowLocationreopenScanreopenScanByRowLocationreplacesetEstimatedRowCount

Field Detail

currentback to summary
protected DataValueDescriptor[] current

The row at the current position of the scan, from which fetch will return values.

holdback to summary
protected boolean hold

The row at the current position of the scan, from which fetch will return values.

sortback to summary
protected MergeSort sort

The sort that this class is scanning.

tranback to summary
protected TransactionManager tran

The transactionManager that opened this scan.

Constructor Detail

SortScanback to summary
pack-priv SortScan(MergeSort sort, TransactionManager tran, boolean hold)

Method Detail

closeback to summary
public void close()

Implements org.apache.derby.iapi.store.access.GenericScanController.close.

Close the scan. @see ScanController#close

fetchback to summary
public final void fetch(DataValueDescriptor[] result) throws StandardException

Implements org.apache.derby.iapi.store.access.ScanController.fetch.

Fetch the row at the current position of the Scan.

Parameters
result:DataValueDescriptor[]

Doc from org.apache.derby.iapi.store.access.ScanController.fetch.

The row into which the value of the current position in the scan is to be stored.

Exceptions
StandardException:

Doc from org.apache.derby.iapi.store.access.ScanController.fetch.

Standard exception policy.

See Also
org.apache.derby.iapi.store.access.ScanController#fetch
fetchNextback to summary
public final boolean fetchNext(DataValueDescriptor[] row) throws StandardException

Implements org.apache.derby.iapi.store.access.ScanController.fetchNext.

Fetch the row at the next position of the Scan. If there is a valid next position in the scan then the value in the template storable row is replaced with the value of the row at the current scan position. The columns of the template row must be of the same type as the actual columns in the underlying conglomerate. The resulting contents of templateRow after a fetchNext() which returns false is undefined. The result of calling fetchNext(row) is exactly logically equivalent to making a next() call followed by a fetch(row) call. This interface allows implementations to optimize the 2 calls if possible. RESOLVE (mikem - 2/24/98) - come back to this and see if coding this differently saves in sort scans, as did the heap recoding.

Parameters
row:DataValueDescriptor[]

The template row into which the value of the next position in the scan is to be stored.

Returns:boolean

True if there is a next position in the scan, false if there isn't.

Exceptions
StandardException:
Standard exception policy.
fetchWithoutQualifyback to summary
public final void fetchWithoutQualify(DataValueDescriptor[] result) throws StandardException

Implements org.apache.derby.iapi.store.access.ScanController.fetchWithoutQualify.

Fetch the row at the current position of the Scan and does not apply the qualifiers. This method will always throw an exception. (SQLState.SORT_IMPROPER_SCAN_METHOD)

Parameters
result:DataValueDescriptor[]

Doc from org.apache.derby.iapi.store.access.ScanController.fetchWithoutQualify.

The row into which the value of the current position in the scan is to be stored.

Exceptions
StandardException:

Doc from org.apache.derby.iapi.store.access.ScanController.fetchWithoutQualify.

Standard exception policy.

See Also
org.apache.derby.iapi.store.access.ScanController#fetchWithoutQualify