public class SnapshotGeneratorFactory extends Object
Modifier | Constructor and Description |
---|---|
protected |
SnapshotGeneratorFactory() |
Modifier and Type | Method and Description |
---|---|
DatabaseSnapshot |
createSnapshot(CatalogAndSchema[] examples,
Database database,
SnapshotControl snapshotControl)
Creates a database snapshot for a given array of catalog/schema combinations.
|
DatabaseSnapshot |
createSnapshot(CatalogAndSchema example,
Database database,
SnapshotControl snapshotControl) |
DatabaseSnapshot |
createSnapshot(DatabaseObject[] examples,
Database database,
SnapshotControl snapshotControl)
Creates a database snapshot for a given array of DatabaseObjects
|
<T extends DatabaseObject> |
createSnapshot(T example,
Database database)
Creates a DatabaseSnapshot for a single DatabaseObject.
|
<T extends DatabaseObject> |
createSnapshot(T example,
Database database,
SnapshotControl snapshotControl)
Creates a DatabaseSnapshot for a single DatabaseObject.
|
Set<Class<? extends DatabaseObject>> |
getContainerTypes(Class<? extends DatabaseObject> type,
Database database) |
Table |
getDatabaseChangeLogLockTable(Database database) |
Table |
getDatabaseChangeLogTable(SnapshotControl snapshotControl,
Database database) |
protected SortedSet<SnapshotGenerator> |
getGenerators(Class<? extends DatabaseObject> generatorClass,
Database database) |
static SnapshotGeneratorFactory |
getInstance()
Return singleton SnapshotGeneratorFactory
|
boolean |
has(DatabaseObject example,
Database database)
Checks if a specific object is present in a database
|
boolean |
hasDatabaseChangeLogLockTable(Database database) |
boolean |
hasDatabaseChangeLogTable(Database database) |
void |
register(SnapshotGenerator generator) |
static void |
reset() |
static void |
resetAll() |
void |
unregister(Class generatorClass) |
void |
unregister(SnapshotGenerator generator) |
public static SnapshotGeneratorFactory getInstance()
public static void reset()
public static void resetAll()
public void register(SnapshotGenerator generator)
public void unregister(SnapshotGenerator generator)
public void unregister(Class generatorClass)
protected SortedSet<SnapshotGenerator> getGenerators(Class<? extends DatabaseObject> generatorClass, Database database)
public boolean has(DatabaseObject example, Database database) throws DatabaseException, InvalidExampleException
example
- The DatabaseObject to check for existencedatabase
- The DBMS in which the object might existDatabaseException
- If a problem occurs in the DBMS-specific codeInvalidExampleException
- If the object cannot be checked properly, e.g. if the object name is ambiguouspublic DatabaseSnapshot createSnapshot(CatalogAndSchema example, Database database, SnapshotControl snapshotControl) throws DatabaseException, InvalidExampleException
public DatabaseSnapshot createSnapshot(CatalogAndSchema[] examples, Database database, SnapshotControl snapshotControl) throws DatabaseException, InvalidExampleException
examples
- an array of CatalogAndSchema objectsdatabase
- the database to work onsnapshotControl
- the options/settings for snapshot generationDatabaseException
- if a problem occurs during snapshottingInvalidExampleException
- if the given catalog/schema combinations are invalid (e.g. duplicates)public DatabaseSnapshot createSnapshot(DatabaseObject[] examples, Database database, SnapshotControl snapshotControl) throws DatabaseException, InvalidExampleException
examples
- an array of DatabaseObjects objectsdatabase
- the database to work onsnapshotControl
- the options/settings for snapshot generationDatabaseException
- if a problem occurs during snapshottingInvalidExampleException
- if the given catalog/schema combinations are invalid (e.g. duplicates)public <T extends DatabaseObject> T createSnapshot(T example, Database database) throws DatabaseException, InvalidExampleException
T
- the type of the object (must extend DatabaseObject)example
- the object to snapshotdatabase
- the database to work onDatabaseException
- if a problem occurs during snapshottingInvalidExampleException
- if the given catalog/schema combinations are invalid (e.g. duplicates)public <T extends DatabaseObject> T createSnapshot(T example, Database database, SnapshotControl snapshotControl) throws DatabaseException, InvalidExampleException
T
- the type of the object (must extend DatabaseObject)example
- the object to snapshotdatabase
- the database to work onsnapshotControl
- the options/settings for snapshot generationDatabaseException
- if a problem occurs during snapshottingInvalidExampleException
- if the given catalog/schema combinations are invalid (e.g. duplicates)public Table getDatabaseChangeLogTable(SnapshotControl snapshotControl, Database database) throws DatabaseException
DatabaseException
public Table getDatabaseChangeLogLockTable(Database database) throws DatabaseException
DatabaseException
public boolean hasDatabaseChangeLogTable(Database database) throws DatabaseException
DatabaseException
public boolean hasDatabaseChangeLogLockTable(Database database) throws DatabaseException
DatabaseException
public Set<Class<? extends DatabaseObject>> getContainerTypes(Class<? extends DatabaseObject> type, Database database)
Copyright © 2023 Liquibase.org. All rights reserved.