borland Packages  Class Hierarchy  dx.dataset Package 

TableDataSet component

java.lang.Object
   +----com.borland.dx.dataset.ReadRow
           +----com.borland.dx.dataset.ReadWriteRow
                   +----com.borland.dx.dataset.DataSet
                           +----com.borland.dx.dataset.StorageDataSet
                                   +----com.borland.dx.dataset.TableDataSet

About the TableDataSet component

Constructors  Properties  Methods  Event Listeners

Implements AccessListener, ColumnDesigner, Designable, MasterNavigateListener, StatusListener, Serializable, EventListener

The TableDataSet is a simple DataSet that may or may not have a formal provider or resolver of its data. Its properties allow it to import file-based data. Use this component to create a StorageDataSet from sources other than SQL databases, for example, by importing data stored in a text file, from data computations, or to simply work with database data off-line. You can also use this component, or any other component that extends from StorageDataSet, to directly access tables stored in a DataStore database file.

You attach this component to any UI control in the same way that other subclasses of StorageDataSet connect to a UI control. Similarly, setting its sort property affects the sort order of the data in this component, and its rowFilterListener filters as it would any other StorageDataSet. It thereby mimics single-user SQL server functionality although no database connection is involved.

With file-based data sources, such as a TextDataFile, the providing phase occurs in a single fetch. Similarly, if a TableDataSet is the detail of a master-detail relationship, setting its fetchAsNeeded property has no effect as all detail records are read from a single fetch operation when file-based data sources are involved.

The resolving phase is the most simple of all resolvers: the data saved to the file overwrites the existing data. To save the data in any StorageDataSet to a text file, set the TextDataFile component's fileName property to the export file prior to calling the StorageDataSet component's save() method.

Saving data in a TextDataFile to a JDBC data source

By default, data loaded into a TableDataSet using a TextDataFile is loaded with a RowStatus.LOADED status. Calling the saveChanges(...) method on a QueryDataSet or ProcedureDataSet has no effect because these rows are not considered as being inserted. Setting the TextDataFile property setLoadAsInserted(true) causes all rows loaded from the TextDataFile to be RowStatus.INSERTED. A subsequent call to saveChanges(...) with the resolver property set to a QueryResolver or ProcedureResolver will insert the rows into the JDBC data source for the Resolver.

Note: This component will not delete existing rows if a DataSet already contains data.


TableDataSet constructors

TableDataSet properties

*Read-only properties **Write-only properties

Properties implemented in com.borland.dx.dataset.DataSet

Properties implemented in com.borland.dx.dataset.ReadRow

Properties implemented in com.borland.dx.dataset.ReadWriteRow

Properties implemented in com.borland.dx.dataset.StorageDataSet

Properties implemented in java.lang.Object

TableDataSet methods

Methods implemented in com.borland.dx.dataset.DataSet

Methods implemented in com.borland.dx.dataset.ReadRow

Methods implemented in com.borland.dx.dataset.ReadWriteRow

Methods implemented in com.borland.dx.dataset.StorageDataSet

Methods implemented in java.lang.Object

TableDataSet event listeners


TableDataSet constructors

TableDataSet()

  public TableDataSet()
Instantiates a TableDataSet class object with default properties.

TableDataSet event listeners

This component is a source for the following event sets.

access

 public final void addAccessListener(AccessListener listener)
 public final void removeAccessListener(AccessListener listener)

calcAggFields

 public synchronized void addCalcAggFieldsListener(CalcAggFieldsListener listener)
 public synchronized void removeCalcAggFieldsListener(CalcAggFieldsListener listener)

calcFields

 public synchronized void addCalcFieldsListener(CalcFieldsListener listener)
 public synchronized void removeCalcFieldsListener(CalcFieldsListener listener)

columnChange

 public void addColumnChangeListener(ColumnChangeListener listener)
 public synchronized void removeColumnChangeListener(ColumnChangeListener listener)

dataChange

 public final void addDataChangeListener(DataChangeListener listener)
 public final void removeDataChangeListener(DataChangeListener listener)

edit

 public void addEditListener(EditListener listener)
 public synchronized void removeEditListener(EditListener listener)

load

 public final synchronized void addLoadListener(LoadListener listener)
 public final synchronized void removeLoadListener(LoadListener listener)

masterNavigate

 public final void addMasterNavigateListener(MasterNavigateListener listener)
 public final void removeMasterNavigateListener(MasterNavigateListener listener)

navigation

 public final void addNavigationListener(NavigationListener listener)
 public final void removeNavigationListener(NavigationListener listener)

open

 public final void addOpenListener(OpenListener listener)
 public final void removeOpenListener(OpenListener listener)

rowFilter

 public final void addRowFilterListener(RowFilterListener listener)
 public final void removeRowFilterListener(RowFilterListener listener)

status

 public final void addStatusListener(StatusListener listener)
 public final void removeStatusListener(StatusListener listener)