borland Packages Class Hierarchy datastore Package
java.lang.Object +----com.borland.datastore.DataStoreSync
Properties Methods
Implements Designable
This component can be used to synchronize data pumped into a JDataStore with the DataStorePump
component. The DataStorePump
optionally creates a /SYS/CONNECTIONS
table and a /SYS/QUERIES
table. The queries table records a query to run against an external database. An external database can be any database that has a JDBC driver available for it. The connections table records all the information needed to connect to an external database using its JDBC driver. The queries table also has fields that can be used to specify whether a table should have its changes saved back to the external database by the DataStoreSync
component, and whether a table should have its contents refreshed with the contents of the external database version of the same table using the query stored in the queries table.
DataStoreSync
is also used by the JDataStore Explorer to keep tables in a JDataStore in sync with tables in an external database.
public final DataStore getDataStore() public void setDataStore(DataStore dataStore)The
DataStore
to synchronize with the external database to which it is connected.
public void close()Close the
DataStoreSync
.
public void open()Open the
DataStoreSync
. Set properties have no effect until the open()
method is called.
public void refreshAllTables()Executes all queries in the
/SYS/QUERIES
table.
public void refreshConnectionTables(int connectionId)Executes all queries in the
/SYS/QUERIES
table which pertain to the specified connectionId
. The connectionId
parameter is matched to the ID
column in the /SYS/CONNECTIONS
table. When there are multiple external databases, this allows tables to be refreshed from a specific external database.
public void refreshTable(String storeName)Refresh a specific table from its external data source. The
storeName
property specified should be the name of a table in the JDataStore.
public void saveAllTables()Save all tables in the JDataStore back to their counterparts in external database connections.
public void saveConnectionTables(int connectionId)Save all tables in the JDataStore which are connected to a specific external database back to their external counterparts. The
connectionId
parameter is matched to the ID
column in the /SYS/CONNECTIONS
table. When there are multiple external databases, this allows tables to be saved back to a specific external database.
public void saveTable(String storeName)Save a specific table back to its counterpart in an external database connection. The
storeName
property specified should be the name of a table in the JDataStore.