borland Packages Class Hierarchy dx.dataset Package
com.borland.dx.dataset.StoreClassFactory
Methods
Classes that implement StoreClassFactory
can be used to set the StorageDataSet.storeClassFactory
property. Currently, this property is only meaningful when the StorageDataSet.store
property is set to a DataStoreConnection
or DataStore
component.
The StorageDataSet.storeClassFactory
property allows a DataStore
table to be accessed only by a specific StorageDataSet
class or StorageDataSet
class extension. This allows an application to make sure that property and event settings are always activated when a DataStore
table is accessed.
One useful example of how this mechanism can be used is the specification of Java triggers for DataStore
tables. By setting the StorageDataSet.storeClassFactory
property and the EditListener
events of a StorageDataSet,
Java trigger events can be enforced for both DataExpress and SQL access to a DataStore
table.
When the StorageDataSet.storeClassFactory
property is set, the name of the class that implements this interface is recorded in the metadata for the associated table in the DataStore
. For DataExpress table opens, this property setting acts as a constraint. The DataStore
will not allow write access to a table that has a StoreClassFactory
metadata setting unless the StorageDataSet
has its storeClassFactory
property set to a class with the same name.
When a DataStore
JDBC connection opens a table that has a StoreClassFactory
recorded in its metadata, DataStore
will do the following:
StoreClassFactory
, it will instantiate the StoreClassFactory
and register this instance with the connection. (There will be one StoreClassFactory
instantiation for each connection.)
DataStore
will then call the StoreClassFactory.getStorageDataSet()
method. The returned StorageDataSet
will be used for the query operation. If the StoreClassFactory
class cannot be instantiated, then write access will be denied to this table.
StorageDataSet getStorageDataSet(Store store, String storeName)Currently, this method is only called when a JDBC connection opens a table that has a
StoreClassFactory
recorded in its metadata.
This method returns a StorageDataSet
for the given storeName
.
store
Store
implementation that storeName
is being opened for. Currently,
this is always a DataStoreConnection
used by a JDBC connection. This can be used to perform transactional operations with the same connection that is attempting to open a table.
storeName
storeName
of table that needs to be opened.