Interface IDataIterator
public interface IDataIterator
An iterator on a result set from a prepared and executed query. Multiple
IResultIterator objects could be associated with the same IExtractionResults
object, if extraction is done at report level
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes this result and provide a hint that the consumer is done with this result, whose resources can be safely released as appropriate.ReturnsIExtractionResults
from which this data iterator is obtained.org.eclipse.birt.data.engine.api.IResultIterator
return the IResultIterator directlyReturns the metadata of this result set's detail row.getValue
(int index) Returns the value of a column.boolean
isEmpty()
see whether this iterator is emptyboolean
next()
Moves down one element from its current position of the iterator.
-
Method Details
-
getQueryResults
IExtractionResults getQueryResults()ReturnsIExtractionResults
from which this data iterator is obtained. -
getResultMetaData
Returns the metadata of this result set's detail row.- Returns:
- The result metadata of a detail row.
- Throws:
org.eclipse.birt.core.exception.BirtException
-
next
boolean next() throws org.eclipse.birt.core.exception.BirtExceptionMoves down one element from its current position of the iterator.- Returns:
- true if next element exists and has not reached the limit on the maximum number of rows that can be accessed.
- Throws:
org.eclipse.birt.core.exception.BirtException
- if error occurs
-
getValue
Returns the value of a column.- Parameters:
columnName
- the name of the column- Returns:
- The value of the given column. It could be null.
- Throws:
org.eclipse.birt.core.exception.BirtException
- if error occurs
-
getValue
- Parameters:
index
- column index. It is 1 based- Throws:
org.eclipse.birt.core.exception.BirtException
- if error occurs
-
close
void close()Closes this result and provide a hint that the consumer is done with this result, whose resources can be safely released as appropriate. -
isEmpty
boolean isEmpty() throws org.eclipse.birt.core.exception.BirtExceptionsee whether this iterator is empty- Returns:
- true if this iterator is false; otherwise, return false
- Throws:
org.eclipse.birt.core.exception.BirtException
-
getResultIterator
org.eclipse.birt.data.engine.api.IResultIterator getResultIterator()return the IResultIterator directly- Returns:
- the IResultIterator
-