public interface SnapshotGenerator
Modifier and Type | Field and Description |
---|---|
static int |
PRIORITY_ADDITIONAL |
static int |
PRIORITY_DATABASE |
static int |
PRIORITY_DEFAULT |
static int |
PRIORITY_NONE |
Modifier and Type | Method and Description |
---|---|
Class<? extends DatabaseObject>[] |
addsTo()
When snapshotting a certain object type (e.g.
|
int |
getPriority(Class<? extends DatabaseObject> objectType,
Database database)
Inquire if this SnapshotGenerator is capable of snapshotting objects of type
objectType (e.g.
|
Class<? extends SnapshotGenerator>[] |
replaces()
Returns classes (and superclasses) that this SnapshotGenerator replaces.
|
<T extends DatabaseObject> |
snapshot(T example,
DatabaseSnapshot snapshot,
SnapshotGeneratorChain chain)
Commands the SnapshotGenerator to create a snapshot (a representation of a database object in Java object form)
of a specific database object.
|
static final int PRIORITY_NONE
static final int PRIORITY_DEFAULT
static final int PRIORITY_DATABASE
static final int PRIORITY_ADDITIONAL
int getPriority(Class<? extends DatabaseObject> objectType, Database database)
objectType
- The object type we are asked to snapshotdatabase
- The DBMS for which the snapshotting should be done<T extends DatabaseObject> T snapshot(T example, DatabaseSnapshot snapshot, SnapshotGeneratorChain chain) throws DatabaseException, InvalidExampleException
T
- The Java object type in which we are to return the snapshot resultexample
- The object we should try to snapshotsnapshot
- The Snapshot object representing the result of the snapshot operations so farchain
- A list of other SnapshotGenerators that might be asked to try the sameDatabaseException
- If an operation on the database failsInvalidExampleException
- If, for some reason, we cannot work on the example object (ambiguous naming etc.)Class<? extends DatabaseObject>[] addsTo()
Class<? extends SnapshotGenerator>[] replaces()
Copyright © 2023 Liquibase.org. All rights reserved.