borland Packages Class Hierarchy jbcl.dataset Package Index
java.lang.Object +----borland.jbcl.dataset.Provider +----borland.sql.dataset.JdbcProvider
Properties Methods
Implements Serializable
The Provider class is a abstract base class that "provides" (or populates) a DataSet with data. Extend this class if you want to create a custom provider. The JBCL includes instantiable subclasses (technically, subclasses of its JDBCProvider subclass) QueryProvider and ProcedureProvider. These classes collect provider functionality using queries and stored procedures on JBDC data sources.
For an example of a custom provider that extends this class, see the ProviderBean class in the sample project Providers.jpr. This sample is located in the samples\borland\samples\tutorial\dataset\providers directory of your JBuilder installation. The The HTML file in that project contains valuable information on creating a custom provider.
public void checkMasterLink(borland.jbcl.dataset.StorageDataSet dataSet, borland.jbcl.dataset.MasterLinkDescriptor masterLink)Called by the StorageDataSet to allow the provider to validate the masterLink property. When the MasterLinkDescriptor.fetchAsNeeded property is enabled (true), the QueryProvider uses this method to check if there is a WHERE clause in the query. If no WHERE clause is specified, the QueryProvider throws a DataSetException.
public void close(borland.jbcl.dataset.StorageDataSet dataSet, boolean loadRemainingRows)Deallocates resources kept for loading data on demand. StorageDataSet calls this method when the storage is being closed and when calling StorageDataSet.closeProvider.
public boolean hasMoreData(borland.jbcl.dataset.StorageDataSet dataSet)Some implementations of a Provider may allow to provide part of the data, then load more data on demand. This method should return true if there is more data to be loaded. To load the data, call the provideMoreData method. StorageDataSet calls this method when an attempt to move past the last record is attempted.
public void ifBusy(borland.jbcl.dataset.StorageDataSet dataSet)Some implementations of the provideData method may optionally provide the data asynchronously. A StorageDataSet has to block actions such as editing and resolving until the asynchronous data is present. This method allows an implementation to give an appropriate error message by raising a DataSetException. The default action is to do nothing (no asynchronous providing).
public abstract void provideData(borland.jbcl.dataset.StorageDataSet dataSet, boolean toOpen)Provides the data for a DataSet. The source of the data, and the method of retrieving the data is up to the implementation of this abstract method.
The toOpen parameter indicates whether this method is called as part of opening this StorageDataSet.
public void provideMoreData(borland.jbcl.dataset.StorageDataSet dataSet)Some implementations of a Provider may allow to provide part of the data and then load more data on demand. This method provides more data if there is more data to be loaded. If no more data is available, this method simply returns. StorageDataSet calls this method when an attempt to move past the last record is attempted.