|
|||||||||
| Home >> All >> org >> apache >> derby >> iapi >> store >> [ access overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.derby.iapi.store.access
Interface RowSource

- All Known Subinterfaces:
- RowLocationRetRowSource
- public interface RowSource
A RowSource is the mechanism for iterating over a set of rows. The RowSource is the interface through which access recieved a set of rows from the client for the purpose of inserting into a single conglomerate.
A RowSource can come from many sources - from rows that are from fast path import, to rows coming out of a sort for index creation.
| Method Summary | |
void |
closeRowSource()
closeRowSource tells the RowSource that it will no longer need to return any rows and it can release any resource it may have. |
org.apache.derby.iapi.types.DataValueDescriptor[] |
getNextRowFromRowSource()
Get the next row as an array of column objects. |
org.apache.derby.iapi.services.io.FormatableBitSet |
getValidColumns()
getValidColumns describes the DataValueDescriptor[] returned by all calls to the getNextRowFromRowSource() call. |
boolean |
needsToClone()
Does the caller of getNextRowFromRowSource() need to clone the row in order to keep a reference to the row past the getNextRowFromRowSource() call which returned the row. |
| Method Detail |
getNextRowFromRowSource
public org.apache.derby.iapi.types.DataValueDescriptor[] getNextRowFromRowSource() throws org.apache.derby.iapi.error.StandardException
- Get the next row as an array of column objects. The column objects can
be a JBMS Storable or any
Serializable/Externalizable/Formattable/Streaming type.
A return of null indicates that the complete set of rows has been read.A null column can be specified by leaving the object null, or indicated by returning a non-null getValidColumns. On streaming columns, it can be indicated by returning a non-null get FieldStates.
If RowSource.needToClone() is true then the returned row (the DataValueDescriptor[]) is guaranteed not to be modified by drainer of the RowSource (except that the input stream will be read, of course) and drainer will keep no reference to it before making the subsequent nextRow call. So it is safe to return the same DataValueDescriptor[] in subsequent nextRow calls if that is desirable for performance reasons.
If RowSource.needToClone() is false then the returned row (the DataValueDescriptor[]) may be be modified by drainer of the RowSource, and the drainer may keep a reference to it after making the subsequent nextRow call. In this case the client should severe all references to the row after returning it from getNextRowFromRowSource().
needsToClone
public boolean needsToClone()
- Does the caller of getNextRowFromRowSource() need to clone the row
in order to keep a reference to the row past the
getNextRowFromRowSource() call which returned the row. This call
must always return the same for all rows in a RowSource (ie. the
caller will call this once per scan from a RowSource and assume the
behavior is true for all rows in the RowSource).
getValidColumns
public org.apache.derby.iapi.services.io.FormatableBitSet getValidColumns()
- getValidColumns describes the DataValueDescriptor[] returned by all calls
to the getNextRowFromRowSource() call.
If getValidColumns returns null, the number of columns is given by the
DataValueDescriptor.length where DataValueDescriptor[] is returned by the
preceeding getNextRowFromRowSource() call. Column N maps to
DataValueDescriptor[N], where column numbers start at zero.
If getValidColumns return a non null validColumns FormatableBitSet the number of
columns is given by the number of bits set in validColumns. Column N is
not in the partial row if validColumns.get(N) returns false. Column N is
in the partial row if validColumns.get(N) returns true. If column N is
in the partial row then it maps to DataValueDescriptor[M] where M is the
count of calls to validColumns.get(i) that return true where i < N. If
DataValueDescriptor.length is greater than the number of columns
indicated by validColumns the extra entries are ignored.
closeRowSource
public void closeRowSource()
- closeRowSource tells the RowSource that it will no longer need to
return any rows and it can release any resource it may have.
Subsequent call to any method on the RowSource will result in undefined
behavior. A closed rowSource can be closed again.
|
|||||||||
| Home >> All >> org >> apache >> derby >> iapi >> store >> [ access overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC