Data Table Implementations
There are several implementations of DataTable
interface:
Simple Data Table
SimpleDataTable
is the primary DataTable
implementation. It uses ArrayList
of data records as underlying data structure.
This implementation supports all the operations defined in DataTable
interface. It also implements Cloneable
interface.
In contrast to other DataTable
implementations, an instance of SimpleDataTable
always knows the number of records that it holds. So getRecordCount()
always returns a non-null
non-negative integer.
ResultSet Data Table
ResultSetDataTable
uses an instance of a subclass of java.sql.ResultSet
as its underlying data structure. Basically, it is a DataTable
representation of a relational database view, which itself is represented by a given ResultSet
instance.
This implementation supports all the accessing and most of the mutating operations defined in DataTable
interface. The exact set of operations that are supported depends on the database engine, the JDBC driver, and the result set type and concurrency settings being used. Sorting operations are not supported.
The number of records in an instance of ResultSetDataTable
is not known until a complete iteration over the underlying result set is performed. When the number of records is not known getRecordCount()
returns null
.
Filtering Data Table
FilteringDataTable
is a DataTable
implementation that serves as a filtering wrapper for another DataTable
instance. An instance of FilteringDataTable
does not hold data and uses another DataTable
as a data source. Only the data records of the source data table that satisfy a provided filter Expression
will be considered as belonging to the corresponding instance of FilteringDataTable
.
This implementation does not support mutating operations.
The number of records in an instance of FilteringDataTable
is not known until a complete iteration over the source data table is performed. When the number of records is not known getRecordCount()
returns null
.
Proxy Data Table
ProxyDataTable
is a DataTable
that represents an instance of ResultSetDataTable
or FilteringDataTable
on the Client's side. The main purpose of ProxyDataTable
is to allow access to requested records in the corresponding data table on the Server without the need to transfer the whole table contents from the Server to the Client at once.
This implementation does not support mutating operations.
The number of records in an instance of ProxyDataTable
is not known until a complete iteration over its data records is performed. When the number of records is not known getRecordCount()
returns null
.
Was this page helpful?