org.eclipse.datatools.sqltools.result
Interface IResultSetObject

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
ResultSetObject, XMLResultSetObject

public interface IResultSetObject
extends java.io.Serializable

The IResultSetObject represents a result set queried from database or represents a tabular data set. One IResultSetObject instance contains two kinds of data: meta data and row data.

Three types of methods are defined in this interface:

Also, notice that for performance consideration, we allow the implementation of this interface to cache some rows into a file.

Author:
Dafan Yang
See Also:
IResultSetRow

Method Summary
 void dispose()
          Disposes resource after resultset is closed;
 java.util.Iterator getAllRecords()
          Returns all result (In memory and file), each element's type should be IResultSetRow
 int getColumnCount()
          Returns the column count
 int getColumnDisplaySize(int index)
          Returns column display size at the given column (based on 1 --- follows the JDBC convention)
 int[] getColumnDisplaySizes()
          Returns display size of all columns
 java.lang.String getColumnName(int index)
          Returns the column name at given index (based on 1 --- follows the JDBC convention)
 java.lang.String[] getColumnNames()
          Returns the column names
 int getColumnSQLType(int index)
          Returns column SQL data type at the given column (based on 1 --- follows the JDBC convention)
 int[] getColumnSQLTypes()
          Returns column SQL types.
 java.util.Iterator getDisplayRecords()
          Returns the records to display (Loaded in memory), each element's type should be IResultSetRow
 int getRowCount()
          Returns number of rows in result (Loaded in memory)
 IResultSetRow getRowData(int row)
          Returns row data of given row index (based on 0)
 int getTotalRowCount()
          Returns total row count (Include cached rows)
 boolean isAllResultLoaded()
          Checks if some result rows are stored into a temporary file
 

Method Detail

getColumnCount

public int getColumnCount()
Returns the column count

Returns:
column count

getColumnNames

public java.lang.String[] getColumnNames()
Returns the column names

Returns:
column names

getColumnName

public java.lang.String getColumnName(int index)
Returns the column name at given index (based on 1 --- follows the JDBC convention)

Parameters:
index - the column index
Returns:
column name

getColumnDisplaySizes

public int[] getColumnDisplaySizes()
Returns display size of all columns

Returns:
columns display sizes

getColumnDisplaySize

public int getColumnDisplaySize(int index)
Returns column display size at the given column (based on 1 --- follows the JDBC convention)

Returns:
column display size

getColumnSQLTypes

public int[] getColumnSQLTypes()
Returns column SQL types.

Returns:
column types

getColumnSQLType

public int getColumnSQLType(int index)
Returns column SQL data type at the given column (based on 1 --- follows the JDBC convention)

Parameters:
index - column index
Returns:
column type

getRowCount

public int getRowCount()
Returns number of rows in result (Loaded in memory)

Returns:
row count

getTotalRowCount

public int getTotalRowCount()
Returns total row count (Include cached rows)

Returns:
total row count

getRowData

public IResultSetRow getRowData(int row)
Returns row data of given row index (based on 0)

Parameters:
row - the row index
Returns:
the row data at the given row index

getAllRecords

public java.util.Iterator getAllRecords()
Returns all result (In memory and file), each element's type should be IResultSetRow

Returns:
an Iterator instance over all records
See Also:
IResultSetRow

getDisplayRecords

public java.util.Iterator getDisplayRecords()
Returns the records to display (Loaded in memory), each element's type should be IResultSetRow

Returns:
an Iterator instance over all display record
See Also:
IResultSetRow

isAllResultLoaded

public boolean isAllResultLoaded()
Checks if some result rows are stored into a temporary file

Returns:
true if there are no cached rows

dispose

public void dispose()
Disposes resource after resultset is closed;



Copyright © 2006 Actuate, IBM Corporation, Sybase, Inc. and others. All rights reserved.