|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectliquibase.database.structure.SqlDatabaseSnapshot
public abstract class SqlDatabaseSnapshot
| Field Summary | |
|---|---|
protected java.util.Set<Column> |
columns
|
protected java.util.Map<java.lang.String,Column> |
columnsMap
|
protected Database |
database
|
protected java.sql.DatabaseMetaData |
databaseMetaData
|
protected java.util.Set<ForeignKey> |
foreignKeys
|
protected java.util.Set<Index> |
indexes
|
protected static java.util.logging.Logger |
log
|
protected java.util.Set<PrimaryKey> |
primaryKeys
|
protected java.util.Set<Sequence> |
sequences
|
protected java.util.Set<Table> |
tables
|
protected java.util.Map<java.lang.String,Table> |
tablesMap
|
protected java.util.Set<UniqueConstraint> |
uniqueConstraints
|
protected java.util.Set<View> |
views
|
protected java.util.Map<java.lang.String,View> |
viewsMap
|
| Constructor Summary | |
|---|---|
SqlDatabaseSnapshot()
Creates an empty database snapshot |
|
SqlDatabaseSnapshot(Database database)
Creates a snapshot of the given database with no status listeners |
|
SqlDatabaseSnapshot(Database database,
java.util.Set<DiffStatusListener> statusListeners)
Creates a snapshot of the given database. |
|
SqlDatabaseSnapshot(Database database,
java.util.Set<DiffStatusListener> statusListeners,
java.lang.String requestedSchema)
Creates a snapshot of the given database. |
|
SqlDatabaseSnapshot(Database database,
java.lang.String schema)
Creates a snapshot of the given database with no status listeners |
|
| Method Summary | |
|---|---|
protected java.lang.String |
convertFromDatabaseName(java.lang.String objectName)
|
protected java.lang.String |
convertPrimaryKeyName(java.lang.String pkName)
|
Column |
getColumn(Column column)
|
Column |
getColumn(java.lang.String tableName,
java.lang.String columnName)
|
java.util.Set<Column> |
getColumns()
|
protected void |
getColumnTypeAndDefValue(Column columnInfo,
java.sql.ResultSet rs,
Database database)
Method assigns correct column type and default value to Column object. |
Database |
getDatabase()
|
ForeignKey |
getForeignKey(java.lang.String foreignKeyName)
|
java.util.Set<ForeignKey> |
getForeignKeys()
|
Index |
getIndex(java.lang.String indexName)
|
java.util.Set<Index> |
getIndexes()
|
PrimaryKey |
getPrimaryKey(java.lang.String pkName)
|
PrimaryKey |
getPrimaryKeyForTable(java.lang.String tableName)
|
java.util.Set<PrimaryKey> |
getPrimaryKeys()
|
java.lang.String |
getSchema()
|
Sequence |
getSequence(java.lang.String sequenceName)
|
java.util.Set<Sequence> |
getSequences()
|
Table |
getTable(java.lang.String tableName)
Returns the table object for the given tableName. |
java.util.Set<Table> |
getTables()
|
UniqueConstraint |
getUniqueConstraint(java.lang.String ucName)
|
java.util.Set<UniqueConstraint> |
getUniqueConstraints()
|
View |
getView(java.lang.String viewName)
|
java.util.Set<View> |
getViews()
|
boolean |
hasDatabaseChangeLogTable()
|
protected boolean |
isPrimaryKey(Column columnInfo)
|
protected void |
readColumns(java.lang.String schema)
|
protected void |
readForeignKeyInformation(java.lang.String schema)
|
protected void |
readIndexes(java.lang.String schema)
|
protected void |
readPrimaryKeys(java.lang.String schema)
|
protected void |
readSequences(java.lang.String schema)
|
protected void |
readTablesAndViews(java.lang.String schema)
|
protected void |
readUniqueConstraints(java.lang.String schema)
|
protected void |
updateListeners(java.lang.String message)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.sql.DatabaseMetaData databaseMetaData
protected Database database
protected java.util.Set<Table> tables
protected java.util.Set<View> views
protected java.util.Set<Column> columns
protected java.util.Set<ForeignKey> foreignKeys
protected java.util.Set<UniqueConstraint> uniqueConstraints
protected java.util.Set<Index> indexes
protected java.util.Set<PrimaryKey> primaryKeys
protected java.util.Set<Sequence> sequences
protected java.util.Map<java.lang.String,Table> tablesMap
protected java.util.Map<java.lang.String,View> viewsMap
protected java.util.Map<java.lang.String,Column> columnsMap
protected static final java.util.logging.Logger log
| Constructor Detail |
|---|
public SqlDatabaseSnapshot()
public SqlDatabaseSnapshot(Database database)
throws JDBCException
JDBCException
public SqlDatabaseSnapshot(Database database,
java.lang.String schema)
throws JDBCException
JDBCException
public SqlDatabaseSnapshot(Database database,
java.util.Set<DiffStatusListener> statusListeners)
throws JDBCException
JDBCException
public SqlDatabaseSnapshot(Database database,
java.util.Set<DiffStatusListener> statusListeners,
java.lang.String requestedSchema)
throws JDBCException
JDBCException| Method Detail |
|---|
public Database getDatabase()
getDatabase in interface DatabaseSnapshotpublic java.util.Set<Table> getTables()
getTables in interface DatabaseSnapshotpublic java.util.Set<View> getViews()
getViews in interface DatabaseSnapshotpublic Column getColumn(Column column)
getColumn in interface DatabaseSnapshot
public Column getColumn(java.lang.String tableName,
java.lang.String columnName)
getColumn in interface DatabaseSnapshotpublic java.util.Set<Column> getColumns()
getColumns in interface DatabaseSnapshotpublic java.util.Set<ForeignKey> getForeignKeys()
getForeignKeys in interface DatabaseSnapshotpublic java.util.Set<Index> getIndexes()
getIndexes in interface DatabaseSnapshotpublic java.util.Set<PrimaryKey> getPrimaryKeys()
getPrimaryKeys in interface DatabaseSnapshotpublic java.util.Set<Sequence> getSequences()
getSequences in interface DatabaseSnapshotpublic java.util.Set<UniqueConstraint> getUniqueConstraints()
getUniqueConstraints in interface DatabaseSnapshot
protected void readTablesAndViews(java.lang.String schema)
throws java.sql.SQLException,
JDBCException
java.sql.SQLException
JDBCExceptionprotected java.lang.String convertFromDatabaseName(java.lang.String objectName)
protected void readColumns(java.lang.String schema)
throws java.sql.SQLException,
JDBCException
java.sql.SQLException
JDBCException
protected void getColumnTypeAndDefValue(Column columnInfo,
java.sql.ResultSet rs,
Database database)
throws java.sql.SQLException,
JDBCException
rs -
java.sql.SQLException
JDBCExceptionprotected boolean isPrimaryKey(Column columnInfo)
protected void readForeignKeyInformation(java.lang.String schema)
throws JDBCException,
java.sql.SQLException
JDBCException
java.sql.SQLException
protected void readIndexes(java.lang.String schema)
throws JDBCException,
java.sql.SQLException
JDBCException
java.sql.SQLException
protected void readPrimaryKeys(java.lang.String schema)
throws JDBCException,
java.sql.SQLException
JDBCException
java.sql.SQLException
protected java.lang.String convertPrimaryKeyName(java.lang.String pkName)
throws java.sql.SQLException
java.sql.SQLException
protected void readUniqueConstraints(java.lang.String schema)
throws JDBCException,
java.sql.SQLException
JDBCException
java.sql.SQLException
protected void readSequences(java.lang.String schema)
throws JDBCException
JDBCExceptionprotected void updateListeners(java.lang.String message)
public Table getTable(java.lang.String tableName)
DatabaseSnapshot
getTable in interface DatabaseSnapshotpublic ForeignKey getForeignKey(java.lang.String foreignKeyName)
getForeignKey in interface DatabaseSnapshotpublic Sequence getSequence(java.lang.String sequenceName)
getSequence in interface DatabaseSnapshotpublic Index getIndex(java.lang.String indexName)
getIndex in interface DatabaseSnapshotpublic View getView(java.lang.String viewName)
getView in interface DatabaseSnapshotpublic PrimaryKey getPrimaryKey(java.lang.String pkName)
getPrimaryKey in interface DatabaseSnapshotpublic PrimaryKey getPrimaryKeyForTable(java.lang.String tableName)
getPrimaryKeyForTable in interface DatabaseSnapshotpublic UniqueConstraint getUniqueConstraint(java.lang.String ucName)
getUniqueConstraint in interface DatabaseSnapshotpublic java.lang.String getSchema()
getSchema in interface DatabaseSnapshotpublic boolean hasDatabaseChangeLogTable()
hasDatabaseChangeLogTable in interface DatabaseSnapshot
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||