All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class PREDATOR.RecordStreamResult

java.lang.Object
   |
   +----PREDATOR.RecordStreamResult

public class RecordStreamResult
extends Object
implements QueryResult
The result returned by a call to Connection.processQuery() when the results are records. This class provides an iteration interface over the resultant records.

See Also:
processQuery

Method Index

 o getNextRecord(SubclassSelector)
Gets an array of the data objects of the attributes of the next record from this result object.
 o getSchema()
Gets the schema for this stream of records.
 o isEmpty()
Returns true if the results have been read completely.

Methods

 o isEmpty
 public synchronized boolean isEmpty() throws InterruptedException
Returns true if the results have been read completely. This function will block until it is known if the stream is empty or not.

Returns:
true if all records have been read.
Throws: InterruptedException
If the current thread is interrupted while blocking waiting for the status
 o getSchema
 public synchronized Schema getSchema()
Gets the schema for this stream of records.

Returns:
The schema associated with these records.
 o getNextRecord
 public synchronized DataObject[] getNextRecord(SubclassSelector Subclasser) throws BadSubclassSelectorException, InterruptedException
Gets an array of the data objects of the attributes of the next record from this result object. This function will block until the next record is ready to be returned. If the stream is empty, it will return a null reference.

Parameters:
Subclasser - An object which determines a subclass to use of DataObjects, or null if no subclass should be selected.
Returns:
An array of the data objects of the attributes of the next record from this result object, or null if the stream is empty.
Throws: BadSubclassSelectorException
If the subclasser returns a null class or one which is not a subclass of the parameter class
Throws: InterruptedException
If the current thread is interrupted while blocking waiting for a record
See Also:
DataObject

All Packages  Class Hierarchy  This Package  Previous  Next  Index