org.eclipse.birt.data.engine.api
Interface IQueryResults


public interface IQueryResults

A handle used to retrieve a data engine query's results. A query results could contain multiple result sets. This is intended to be used by both Factory and Presentation Engines in BIRT, including later releases when a report document persists. Beyond Release 1, this would include methods to save and restore results in a persisted Report Document.


Method Summary
 void close()
          Closes all query result set(s) associated with this object; provides a hint to the query that it can safely release all associated resources.
 java.lang.String getID()
          Every query results has a unique id.
 IPreparedQuery getPreparedQuery()
          Returns the IPreparedQuery that produced this instance.
 IResultIterator getResultIterator()
          Returns the current result's iterator.
 IResultMetaData getResultMetaData()
          Returns the metadata of the first or current result set
This method provides the result metadata without having to first fetch the result data.
 

Method Detail

getID

public java.lang.String getID()
Every query results has a unique id. This ID will be used to retrieve a stored query results from report document. Meantime, it might be used as a data source ID to define a query definition.

Returns:
a unique ID

getPreparedQuery

public IPreparedQuery getPreparedQuery()
Returns the IPreparedQuery that produced this instance.


getResultMetaData

public IResultMetaData getResultMetaData()
                                  throws org.eclipse.birt.core.exception.BirtException
Returns the metadata of the first or current result set
This method provides the result metadata without having to first fetch the result data.

Returns Null if the metadata is not available before fetching from an IResultIterator, or if it is ambiguous on which result set to reference. In such case, one should obtain the result metadata from a specific IResultIterator.

Returns:
The metadata of the first result set's detail row in this IQueryResults. Null if not available or ambiguous on which result set to reference.
Throws:
org.eclipse.birt.data.engine.core.DataException - if error occurs in Data Engine
org.eclipse.birt.core.exception.BirtException

getResultIterator

public IResultIterator getResultIterator()
                                  throws org.eclipse.birt.core.exception.BirtException
Returns the current result's iterator. Repeated call of this method without having advanced to the next result would return the same iterator at its current state.

Returns:
The current result's iterator.
Throws:
org.eclipse.birt.data.engine.core.DataException - if error occurs in Data Engine
org.eclipse.birt.core.exception.BirtException

close

public void close()
           throws org.eclipse.birt.core.exception.BirtException
Closes all query result set(s) associated with this object; provides a hint to the query that it can safely release all associated resources. The query results might have iterators open on them. Iterators associated with the query result sets are invalidated and can no longer be used.

Throws:
org.eclipse.birt.core.exception.BirtException


Copyright © 2005 Actuate Corp. All rights reserved.