borland Packages Class Hierarchy datastore Package
java.lang.Object +----com.borland.datastore.DataStorePump
Constructors Properties Methods
Implements Designable
DataStorePump
can be used to easily migrate data into a JDataStore from another data source.
public DataStorePump()
public String getCatalogPattern() public void setCatalogPattern(String newCatalogPattern)Catalog Pattern used by
getTableDefs()
method when calling java.sql.DatabaseMetaData.getTables()
against the external database to select tables for import.
public Database getDatabaseSource() public void setDatabaseSource(Database database)Database to copy tables from.
public DataStore getDataStore() public void setDataStore(DataStore dataStore)DataStore to copy tables to.
public boolean isEnableRefresh() public void setEnableRefresh(boolean newEnableRefresh)If true, the
TableDef.enableRefresh
property will be set to true for every TableDef
returned by getTableDefs()
method.
public boolean isEnableSave() public void setEnableSave(boolean newEnableSave)If true, the
TableDef.enableSave
property will be set to true for every TableDef
returned by getTableDefs()
method.
public boolean isImportIndexes() public void setImportIndexes(boolean newimportIndexes)If true, index definitions from the external database will be created for the same table inside the JDataStore database.
public boolean isRecordQueries() public void setRecordQueries(boolean newRecordQueries)If true, the queries used to import the table definitions will be recorded in the
/SYS/QUERIES
and /SYS/CONNECTIONS
tables.
public String getSchemaPattern() public void setSchemaPattern(String newSchemaPattern)Schema Pattern used by
getTableDefs()
method when calling java.sql.DatabaseMetaData.getTables()
against the external database to select tables for import.
public TableDef[] getTableDefs()Creates an array of
TableDefs
for all tables from the database whose name matches the pattern specifications for catalog, schema and table names.
public String getTablePattern() public void setTablePattern(String newTablePattern)Schema Pattern used by
getTableDefs()
method when calling java.sql.DatabaseMetaData.getTables()
against the external database to select tables for import.
public boolean isUpperCaseColumnNames() public void setUpperCaseColumnNames(boolean upperCase)If true, column names of imported tables are forced to upper case.
public boolean isUpperCaseIndexNames() public void setUpperCaseIndexNames(boolean upperCase)If true, force names of indexes from imported tables to upper case.
public boolean isUpperCaseTableNames() public void setUpperCaseTableNames(boolean upperCase)If true, force names of imported tables to upper case.
public void close()This method should be called when DataStorePump is no longer needed.
public void copyTable(TableDef td)Copy a table into the JDataStore based on the
TableDef
specification. Note that TableDefs
can be modified to change identifier casing or remove secondary or primary index specifications.
public static TableDataSet getConnectionsTable()Creates
SYS/CONNECTIONS
table used for refreshing table data from another database and saving table data back to another database.
See also:
DataStoreSync
public static Properties getExtendedProperties(String s)Creates an extended properties object that can be used by a JDBC driver from a comma separated list of attribute value pairs e.g. "username=joe,password=joey54,charset=Western"
public SortDescriptor[] getIndexes(TableDef td)Get an array of
SortDescriptors
that specify all secondary and primary indexes for the table specified by the TableDef
.
public static TableDataSet getQueriesTable()Creates
SYS/QUERIES
table used for refreshing table data from another database and saving table data back to another database.
See also:
DataStoreSync
public String getSelectForTable(String catalogName, String schemaName, String tableName)Builds a default select statement for a table with the given name from the database specified by the
databaseSource
property.
public void open()Call this to use the
DataStorePump
. Must be called after setting databaseSource
and dataStore
properties.