|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.riverock.dbrevision.db.DatabaseStructureManager
public class DatabaseStructureManager
Constructor Summary | |
---|---|
DatabaseStructureManager()
|
Method Summary | |
---|---|
static void |
addColumn(Database adapter,
String tableName,
DbField field)
add column to table |
static DbField |
cloneDescriptionField(DbField srcField)
|
static DbForeignKey |
cloneDescriptionFK(DbForeignKey srcFk)
|
static DbPrimaryKey |
cloneDescriptionPK(DbPrimaryKey srcPk)
|
static DbPrimaryKeyColumn |
cloneDescriptionPrimaryKeyColumn(DbPrimaryKeyColumn srcCol)
|
static DbTable |
cloneDescriptionTable(DbTable srcTable)
Clone description of table. |
static void |
copyFieldData(Database db_,
DbTable table,
DbField sourceField,
DbField targetField)
|
static void |
createForeignKey(Database adapter,
DbForeignKey fk)
create foreign key |
static DbKeyActionRule |
decodeDeferrabilityRule(ResultSet rs)
|
static DbKeyActionRule |
decodeDeleteRule(ResultSet rs)
|
static DbKeyActionRule |
decodeUpdateRule(ResultSet rs)
|
static void |
dropColumn(Database adapter,
DbTable table,
DbField field)
drop field from specified table |
static void |
dropView(Database adapter,
DbView view)
|
static DbDataTable |
getDataTable(Database adapter,
DbTable table)
|
static List<DbField> |
getFieldsList(Database adapter,
String schemaPattern,
String tablePattern)
|
static List<DbForeignKey> |
getForeignKeys(Database adapter,
String schemaName,
String tableName)
Return info about all PK for tables, which referenced from current table(tableName) |
static List<DbIndex> |
getIndexes(Database adapter,
String schemaName,
String tableName)
|
static DbPrimaryKey |
getPrimaryKey(Database adapter,
String schemaPattern,
String tablePattern)
|
static List<DbTable> |
getTableList(Connection conn1,
String schemaPattern,
String tablePattern)
Return filtered list of tables usually schemaPattern is a db username if tablePattern equals "%", this mean what selected all tables |
static void |
setDataTable(Database adapter,
DbTable table)
|
static void |
setDefaultValueTimestamp(Database adapter,
DbTable originTable,
DbField originField)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DatabaseStructureManager()
Method Detail |
---|
public static void createForeignKey(Database adapter, DbForeignKey fk)
adapter
- db adapterfk
- list of foreign keyspublic static void addColumn(Database adapter, String tableName, DbField field)
adapter
- db adaptertableName
- table namefield
- column descriptorpublic static void dropColumn(Database adapter, DbTable table, DbField field)
adapter
- db adaptertable
- table definitionfield
- field to droppublic static void dropView(Database adapter, DbView view)
public static void setDataTable(Database adapter, DbTable table)
public static DbDataTable getDataTable(Database adapter, DbTable table)
adapter
- db adaptertable
- table for get data
public static List<DbTable> getTableList(Connection conn1, String schemaPattern, String tablePattern)
conn1
- db connectionschemaPattern
- schema name filtertablePattern
- table name filter
public static List<DbField> getFieldsList(Database adapter, String schemaPattern, String tablePattern)
adapter
- db adapterschemaPattern
- StringtablePattern
- String
public static List<DbIndex> getIndexes(Database adapter, String schemaName, String tableName)
public static List<DbForeignKey> getForeignKeys(Database adapter, String schemaName, String tableName)
adapter
- db adaptertableName
- name of tableschemaName
- name of schema
public static DbPrimaryKey getPrimaryKey(Database adapter, String schemaPattern, String tablePattern)
public static void setDefaultValueTimestamp(Database adapter, DbTable originTable, DbField originField)
public static DbKeyActionRule decodeUpdateRule(ResultSet rs)
public static DbKeyActionRule decodeDeleteRule(ResultSet rs)
public static DbKeyActionRule decodeDeferrabilityRule(ResultSet rs)
public static DbPrimaryKeyColumn cloneDescriptionPrimaryKeyColumn(DbPrimaryKeyColumn srcCol)
public static DbForeignKey cloneDescriptionFK(DbForeignKey srcFk)
public static DbPrimaryKey cloneDescriptionPK(DbPrimaryKey srcPk)
public static DbField cloneDescriptionField(DbField srcField)
public static DbTable cloneDescriptionTable(DbTable srcTable)
srcTable
- source table
public static void copyFieldData(Database db_, DbTable table, DbField sourceField, DbField targetField)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |