org.eclipse.birt.chart.internal.datafeed
Class ResultSetDataSet

java.lang.Object
  extended byorg.eclipse.birt.chart.internal.datafeed.ResultSetDataSet
All Implemented Interfaces:
IResultSetDataSet

public final class ResultSetDataSet
extends java.lang.Object
implements IResultSetDataSet

Maintains a subset of a resultset by defining a selective list of columns and a row range to be extracted from a full resultset. An instance of this class is provided to a custom data set processor that is capable of converting the resultset subset content into the expected chart dataset format.


Constructor Summary
ResultSetDataSet(java.util.List lst, int dataType)
          Creates the resultset using a given list.
ResultSetDataSet(ResultSetWrapper rsw, int[] iaColumnIndexes, long lStartRow, long lEndRow)
          The constructor that creates an instance of a resultset subset by extracting appropriate columns and a row range from a resultset
 
Method Summary
 int getColumnCount()
           
 int getDataType()
          Returns the data type associated with a single column resultset subset.
 int getDataType(int columnIndex)
          Returns the data type of a given column associated with a multi-column resultset subset.
 long getSize()
          Returns the number of rows associated with this resultset subset instance
 boolean hasNext()
          Indicates whether another row of data is available without actually moving the cursor
 java.lang.Object[] next()
          Returns a row of data and advances the resultset subset cursor
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultSetDataSet

public ResultSetDataSet(ResultSetWrapper rsw,
                        int[] iaColumnIndexes,
                        long lStartRow,
                        long lEndRow)
The constructor that creates an instance of a resultset subset by extracting appropriate columns and a row range from a resultset

Parameters:
lStartRow -
lEndRow -

ResultSetDataSet

public ResultSetDataSet(java.util.List lst,
                        int dataType)
Creates the resultset using a given list.

Parameters:
lst -
Method Detail

hasNext

public boolean hasNext()
Description copied from interface: IResultSetDataSet
Indicates whether another row of data is available without actually moving the cursor

Specified by:
hasNext in interface IResultSetDataSet
Returns:
'true' if another row of data is available

next

public java.lang.Object[] next()
Description copied from interface: IResultSetDataSet
Returns a row of data and advances the resultset subset cursor

Specified by:
next in interface IResultSetDataSet
Returns:
An 'Object[]' that represents a resultset subset tuple

getDataType

public int getDataType()
Description copied from interface: IResultSetDataSet
Returns the data type associated with a single column resultset subset. Note the result is only valid for single column subset.

Specified by:
getDataType in interface IResultSetDataSet
Returns:
A data type associated with a single column resultset

getDataType

public int getDataType(int columnIndex)
Description copied from interface: IResultSetDataSet
Returns the data type of a given column associated with a multi-column resultset subset.

Specified by:
getDataType in interface IResultSetDataSet
Returns:
A data type associated with a multi-column resultset

getColumnCount

public int getColumnCount()
Specified by:
getColumnCount in interface IResultSetDataSet
Returns:
Returns the columns count for current resultset subset.

getSize

public long getSize()
Description copied from interface: IResultSetDataSet
Returns the number of rows associated with this resultset subset instance

Specified by:
getSize in interface IResultSetDataSet
Returns:
The number of rows associated with this resultset subset instance


Copyright © 2005-2007 Actuate Corp. All rights reserved.