borland Packages  Class Hierarchy  datastore Package 

DataStoreSync class

java.lang.Object
   +----com.borland.datastore.DataStoreSync

About the DataStoreSync class

Properties  Methods  

Implements Designable

Note: This is a feature of JBuilder Professional and Enterprise.

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.


DataStoreSync properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in java.lang.Object

DataStoreSync methods

Methods implemented in this class

Methods implemented in java.lang.Object


DataStoreSync properties

dataStore

 public final DataStore getDataStore()
 public void setDataStore(DataStore dataStore)
The DataStore to synchronize with the external database to which it is connected.

DataStoreSync methods

close()

  public void close()
Close the DataStoreSync.

open()

  public void open()
Open the DataStoreSync. Set properties have no effect until the open() method is called.

refreshAllTables()

  public void refreshAllTables()
Executes all queries in the /SYS/QUERIES table.

refreshConnectionTables(int)

  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.

refreshTable(java.lang.String)

  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.

saveAllTables()

  public void saveAllTables()
Save all tables in the JDataStore back to their counterparts in external database connections.

saveConnectionTables(int)

  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.

saveTable(java.lang.String)

  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.