borland Packages Class Hierarchy dx.dataset Package
java.lang.Object +----com.borland.dx.dataset.ProviderHelp
Properties Methods
This class collects utility functions that operate on the StorageDataSet
and DataSet
classes
that are helpful for provider/resolver implementations. These methods are implemented inside
StorageDataSet
, but are not functions typical for DataSet
usage.
public static final void endResolution(StorageDataSet dataSet)Used by the
ResolutionManager
to signal that StorageDataSet
is no longer in a
"resolving" mode. Once the startResolution()
method is called, any other providing or resolving
operation is prohibited until this method is called.
public static final void failIfOpen(StorageDataSet dataSet)Causes a
DataSetException
to be thrown if the DataSet
is open.
public static final StorageDataSet getResolverDataSet(DataSet dataSet)Returns a
StorageDataSet
that contains the metadata for a given StorageDataSet
or
DataSetView
.
public static final int getStructureAge(StorageDataSet dataSet)Returns an int, which can be saved and used by a provider as a flag that a column restructure has occurred. This number is incremented each time a column structure changes. Therefore, if a resolver initially calls this method and stores the return value, any change in its return value on a subsequent call indicates that the resolver must discard any cached information about the
DataSet
.
public static final int[] initData(StorageDataSet dataSet, Column[] columns, boolean updateColumns, boolean keepExistingColumns)Used by providers,
initData()
initializes the data storage of a DataSet
for a new set of columns and returns an ordinal map of the passed in columns to the corresponding columns in the DataSet
. This method differs from the StorageDataSet.setColumns()
method in that it preserves persistent columns. Note that several column properties in the columns array will be merged in with existing columns in the StorageDataSet
columns that have the same name.
dataSet
StorageDataSet
whose data storage is to be initialized.
columns
updateColumns
updateColumns
and keepExistingColumns
parameters are true,
non-persistent columns will also be retained.
keepExistingColumns
public static final int[] initData(StorageDataSet dataSet, Column[] columns, boolean updateColumns, boolean keepExistingColumns, boolean emptyRows)This method has been deprecated. Use
initData(com.borland.dx.dataset.StorageDataSet, com.borland.dx.dataset.Column[], boolean, boolean)
instead.
public static final boolean isCopyProviderStreams(StorageDataSet dataSet)A provider can call this method to determine if it should make copies of data from columns of type
Variant.INPUT_STREAM.
The method will return false if the storage is going to copy the stream, thus there is no need for the provider to copy the data. The method returns true if the storage is just storing a reference to the InputStream
. In this case, the provider might need to make a memory copy of the data, if the stream has a limited lifetime or is not resetable.
public static final boolean isProviderPropertyChanged(StorageDataSet dataSet)Reflects whether this
StorageDataSet
has received some property change which could affect the
column structure or set of row data, for example, a change in QueryDescriptor
or TextDataFile
.
Used by Provider
classes. The JdbcProvider
uses this to decide if it needs to discard cached information about the JDBC data source.
setProviderPropertyChanged(StorageDataSet,boolean)
public static final void markPendingStatus(DataSet dataSet, boolean on)Marks a row as pending resolution. Used by the
ResolutionManager
when saving
changes from a DataSet
to a remote data provider that supports transactions, for example, JDBC connections.
public static final void setMetaDataMissing(StorageDataSet dataSet, boolean hasRowIds)Normally set by
Providers
to indicate that there is insufficient
metadata to post any changes back to its original source.
public static final void setProviderPropertyChanged(StorageDataSet dataSet, boolean propertiesChanged)Used by
Provider
classes. This property reflects whether this StorageDataSet
has received some property change which could affect the column structure or set of row data, for example, a change in QueryDescriptor
or TextDataFile
.
isProviderPropertyChanged(com.borland.dx.dataset.StorageDataSet)
public static final void startResolution(StorageDataSet dataSet, boolean postEdits)Used by the
ResolutionManager
to place a StorageDataSet
into a "resolving" mode.
This mode prohibits any other resolution or providing to occur. After the resolution phase is complete,
the endResolution()
method should be called.
If the postEdits
parameter is true, the StorageDataSet
will post
an unposted row for itself and any DataSetViews
that may be associated with the
StorageDataSet
.