Servoy 4.1.x Public API

com.servoy.j2db.dataprocessing
Interface IDataSet

All Superinterfaces:
Serializable

public interface IDataSet
extends Serializable


Method Summary
 boolean addColumn(int columnIndex, String columnName, int columnType)
          adds a new column to the data set
 void addRow(int index, Object[] new_record_value)
           
 void addRow(Object[] array)
          Add a row in memory (not in db).
 void clearHadMoreRows()
          clears the moreRows boolean
 int getColumnCount()
          Get the number of columns in this dataset.
 String[] getColumnNames()
          Return the names of the columns, can be null is not requested from server.
 int[] getColumnTypes()
          Return the types of the columns, can be null is not requested from server.
 Object[] getRow(int row)
          Get a specified row.
 int getRowCount()
          Get the number of rows in this dataset.
 boolean hadMoreRows()
          Returns true if the query had more results but this set was limited by performQuery (rowsToRetrieve).
 boolean removeColumn(int columnIndex)
          removes the column from the specified position (first position is 0)
 void removeRow(int index)
          Remove a row from memory (not in db).
 void setRow(int index, Object[] array)
          Add a row in memory (not in db).
 void sort(int column, boolean ascending)
           
 

Method Detail

getRowCount

int getRowCount()
Get the number of rows in this dataset.

Returns:
int the count

getRow

Object[] getRow(int row)
Get a specified row.

Parameters:
row - the row to get
Returns:
the row data

removeRow

void removeRow(int index)
Remove a row from memory (not in db).

Parameters:
index, - -1 is removeAll

setRow

void setRow(int index,
            Object[] array)
Add a row in memory (not in db).

Parameters:
index -
array -

addRow

void addRow(Object[] array)
Add a row in memory (not in db).

Parameters:
array -

getColumnCount

int getColumnCount()
Get the number of columns in this dataset.

Returns:
int the count

getColumnNames

String[] getColumnNames()
Return the names of the columns, can be null is not requested from server.

Returns:
the names

getColumnTypes

int[] getColumnTypes()
Return the types of the columns, can be null is not requested from server.

Returns:
the types

hadMoreRows

boolean hadMoreRows()
Returns true if the query had more results but this set was limited by performQuery (rowsToRetrieve).

Returns:
boolean

clearHadMoreRows

void clearHadMoreRows()
clears the moreRows boolean


addRow

void addRow(int index,
            Object[] new_record_value)
Parameters:
index -
new_record_value -

sort

void sort(int column,
          boolean ascending)
Parameters:
column -
ascending -

addColumn

boolean addColumn(int columnIndex,
                  String columnName,
                  int columnType)
adds a new column to the data set

Parameters:
columnIndex - the index where the column should be added (index begins with 0)
columnName - the name of the added column
Returns:
True if the adding was successful and false otherwise; if the method returns false, it means no modifications to the data set were made

removeColumn

boolean removeColumn(int columnIndex)
removes the column from the specified position (first position is 0)

Parameters:
columnIndex -
Returns:
True only if successful; false otherwise

Copyright © 2009 Servoy B.V.

>