|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.dbreplicator.replication
Class MetaDataInfo
java.lang.Objectorg.dbreplicator.replication.MetaDataInfo
- Direct Known Subclasses:
- CloudscapeMataDataInfo, CommonMetaDataInfo, pgMetaDataInfo
public abstract class MetaDataInfo
- extends java.lang.Object
This Abstract class gets the connection object of the specified publisher or subscriber and then stores it's metadata information in the DataBaseMetaData object(dbmd). This inforamtion is used for performing different operations on the tables of the publication or subscription and on the columns and constraint.
| Constructor Summary | |
|---|---|
MetaDataInfo()
|
|
MetaDataInfo(java.sql.Connection connection0)
|
|
| Method Summary | |
|---|---|
void |
addCheckConstraintForExistingTable(java.lang.String schemaName,
java.lang.String tableName,
java.util.TreeMap primConsMap,
AbstractDataBaseHandler dbh)
|
abstract void |
appendUniqueKeyConstraints(java.lang.String schemaName,
java.lang.String tableName,
java.lang.StringBuffer cols)
|
void |
checkTableExistance(SchemaQualifiedName sname)
Checks the existance of the pericular table in the database. |
void |
checkTableSequenceAccordingForeignKey(java.lang.String schemaName,
java.lang.String tableName,
java.util.ArrayList tableList)
Check the sequence of table according to primary key. |
java.lang.String |
generateColumnsQueryForClientNode(AbstractDataBaseHandler dbh,
int srcVendorType,
java.lang.String schemaName,
java.lang.String tableName,
int tgtVendorType)
Generating a query ---- [ columnName dataType[(size)] [default] [not null] , [ columnName dataType[(size)] [default] [not null] ,...]] |
java.lang.String |
getAppliedConstraints(java.lang.String schemaName,
java.lang.String tableName,
java.util.TreeMap primConsMap)
Gets the sequence of different constraint along with datatype in the query formate. |
java.lang.String |
getAppliedConstraintsForExistingTable(java.lang.String schemaName,
java.lang.String tableName,
java.util.TreeMap primConsMap,
AbstractDataBaseHandler dbh)
|
java.lang.String |
getCatalogName(java.lang.String identifier)
|
abstract java.util.ArrayList |
getChildTables(java.lang.String parentTable)
|
java.util.ArrayList |
getColumnDataTypeInfo(AbstractDataBaseHandler dbh,
java.lang.String schemaName,
java.lang.String tableName)
For each column, its dataype is converted in respective database datatype format in typeinfo then it is set in the dbh, passed to Class ColumnsInfo and it's objects are stored in colInfoList. |
java.util.HashMap |
getColumnsInfo(java.lang.String schemaName,
java.lang.String tableName)
|
java.lang.String |
getExistingTableQuery(AbstractDataBaseHandler dbh,
SchemaQualifiedName sname,
int pubVendorType)
|
abstract java.util.ArrayList |
getExportedTableCols(SchemaQualifiedName repTableQualifiedtableName)
|
java.util.ArrayList |
getExportedTableColsList(SchemaQualifiedName repTableQualifiedtableName)
|
abstract java.util.ArrayList |
getForeignKeyConstraints(java.lang.String schemaName,
java.lang.String tableName)
|
abstract java.lang.Object[] |
getImportedColsOfChildTable(java.lang.String parentTable,
java.lang.String childTable)
|
abstract java.util.ArrayList |
getImportedTables(SchemaQualifiedName schemaQualifiedName,
java.util.List passedSchemaQualifiedNamesList,
DirectedGraph graph,
java.lang.String[] removeCycleTableNames0)
|
java.util.Map |
getImportedTablesInfo(SchemaQualifiedName[] schemaQualifiedTableNames,
DirectedGraph graph,
java.lang.String[] removeCycleTableNames)
|
java.lang.String |
getSchemaName(java.lang.String identifier)
|
java.lang.String |
getTableName(java.lang.String schematable)
Implemented to handle the casesensitveness of postgreSQL for table and and Schema Name.Method is overrided in pgMetaDataInfo. |
abstract void |
setAllColumns(RepTable repTable,
java.lang.String schemaName,
java.lang.String tableName)
|
void |
setForeignKeyColumns(RepTable repTable,
java.lang.String schemaName,
java.lang.String tableName)
|
void |
setPrimaryColumns(RepTable repTable,
java.lang.String schemaName,
java.lang.String tableName)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
MetaDataInfo
public MetaDataInfo() throws RepException
- Throws:
RepException
MetaDataInfo
public MetaDataInfo(java.sql.Connection connection0) throws RepException
- Throws:
RepException
| Method Detail |
|---|
checkTableExistance
public void checkTableExistance(SchemaQualifiedName sname) throws RepException
- Checks the existance of the pericular table in the database.
- Parameters:
sname-- Throws:
RepException
checkTableSequenceAccordingForeignKey
public void checkTableSequenceAccordingForeignKey(java.lang.String schemaName, java.lang.String tableName, java.util.ArrayList tableList) throws RepException
- Check the sequence of table according to primary key.
If table are not sorted order then throw the error
It checks that if there is a table with any primary key and some
foreign keys then all the tables of foreign key columns are also
included in the publisher or not.
- Parameters:
schemaName- StringtableName- StringtableList- ArrayList- Throws:
RepException
getColumnDataTypeInfo
public java.util.ArrayList getColumnDataTypeInfo(AbstractDataBaseHandler dbh, java.lang.String schemaName, java.lang.String tableName) throws RepException, java.sql.SQLException
- For each column, its dataype is converted in respective database datatype
format in typeinfo then it is set in the dbh, passed to Class ColumnsInfo
and it's objects are stored in colInfoList.
- Parameters:
dbh-schemaName-tableName-- Returns:
- ArrayList
- Throws:
RepExceptionjava.sql.SQLException
getColumnsInfo
public java.util.HashMap getColumnsInfo(java.lang.String schemaName, java.lang.String tableName) throws RepException, java.sql.SQLException
- Throws:
RepExceptionjava.sql.SQLException
generateColumnsQueryForClientNode
public java.lang.String generateColumnsQueryForClientNode(AbstractDataBaseHandler dbh, int srcVendorType, java.lang.String schemaName, java.lang.String tableName, int tgtVendorType) throws RepException
- Generating a query ----
[ columnName dataType[(size)] [default] [not null] ,
[ columnName dataType[(size)] [default] [not null] ,...]]
- Parameters:
dbh-srcVendorType-schemaName-tableName-tgtVendorType-- Returns:
- String
- Throws:
java.sql.SQLExceptionRepException
getAppliedConstraints
public java.lang.String getAppliedConstraints(java.lang.String schemaName, java.lang.String tableName, java.util.TreeMap primConsMap) throws RepException
- Gets the sequence of different constraint along with datatype in the
query formate.
- Parameters:
schemaName-tableName-primConsMap-- Returns:
- String
- Throws:
RepException
getAppliedConstraintsForExistingTable
public java.lang.String getAppliedConstraintsForExistingTable(java.lang.String schemaName, java.lang.String tableName, java.util.TreeMap primConsMap, AbstractDataBaseHandler dbh) throws RepException
- Throws:
RepException
addCheckConstraintForExistingTable
public void addCheckConstraintForExistingTable(java.lang.String schemaName, java.lang.String tableName, java.util.TreeMap primConsMap, AbstractDataBaseHandler dbh) throws RepException
- Throws:
RepException
setPrimaryColumns
public void setPrimaryColumns(RepTable repTable, java.lang.String schemaName, java.lang.String tableName) throws RepException, java.sql.SQLException
- Throws:
RepExceptionjava.sql.SQLException
setForeignKeyColumns
public void setForeignKeyColumns(RepTable repTable, java.lang.String schemaName, java.lang.String tableName) throws RepException, java.sql.SQLException
- Throws:
RepExceptionjava.sql.SQLException
getExistingTableQuery
public java.lang.String getExistingTableQuery(AbstractDataBaseHandler dbh, SchemaQualifiedName sname, int pubVendorType) throws RepException, java.sql.SQLException
- Throws:
RepExceptionjava.sql.SQLException
getCatalogName
public java.lang.String getCatalogName(java.lang.String identifier)
getSchemaName
public java.lang.String getSchemaName(java.lang.String identifier)
getTableName
public java.lang.String getTableName(java.lang.String schematable)
- Implemented to handle the casesensitveness of postgreSQL
for table and and Schema Name.Method is overrided in
pgMetaDataInfo.
- Parameters:
schematable- String- Returns:
- String
getImportedTablesInfo
public java.util.Map getImportedTablesInfo(SchemaQualifiedName[] schemaQualifiedTableNames, DirectedGraph graph, java.lang.String[] removeCycleTableNames) throws RepException
- Throws:
RepException
getChildTables
public abstract java.util.ArrayList getChildTables(java.lang.String parentTable) throws RepException
- Throws:
RepException
getImportedColsOfChildTable
public abstract java.lang.Object[] getImportedColsOfChildTable(java.lang.String parentTable, java.lang.String childTable) throws RepException
- Throws:
RepException
getImportedTables
public abstract java.util.ArrayList getImportedTables(SchemaQualifiedName schemaQualifiedName, java.util.List passedSchemaQualifiedNamesList, DirectedGraph graph, java.lang.String[] removeCycleTableNames0) throws RepException
- Throws:
RepException
getForeignKeyConstraints
public abstract java.util.ArrayList getForeignKeyConstraints(java.lang.String schemaName, java.lang.String tableName) throws RepException
- Throws:
RepException
appendUniqueKeyConstraints
public abstract void appendUniqueKeyConstraints(java.lang.String schemaName, java.lang.String tableName, java.lang.StringBuffer cols) throws RepException
- Throws:
RepException
getExportedTableCols
public abstract java.util.ArrayList getExportedTableCols(SchemaQualifiedName repTableQualifiedtableName) throws RepException
- Throws:
RepException
getExportedTableColsList
public java.util.ArrayList getExportedTableColsList(SchemaQualifiedName repTableQualifiedtableName) throws RepException
- Throws:
RepException
setAllColumns
public abstract void setAllColumns(RepTable repTable, java.lang.String schemaName, java.lang.String tableName) throws RepException, java.sql.SQLException
- Throws:
RepExceptionjava.sql.SQLException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.dbreplicator.replication.MetaDataInfo

