public abstract class DatabaseSnapshot extends Object implements LiquibaseSerializable
LiquibaseSerializable.SerializationType
Modifier and Type | Field and Description |
---|---|
static String |
ALL_CATALOGS_STRING_SCRATCH_KEY |
GENERIC_CHANGELOG_EXTENSION_NAMESPACE, GENERIC_SNAPSHOT_EXTENSION_NAMESPACE, STANDARD_CHANGELOG_NAMESPACE, STANDARD_SNAPSHOT_NAMESPACE
Constructor and Description |
---|
DatabaseSnapshot(DatabaseObject[] examples,
Database database) |
Modifier and Type | Method and Description |
---|---|
DatabaseSnapshot |
clone(DatabaseObject[] examples)
Searches the current snapshot content for the given examples.
|
protected SnapshotGeneratorChain |
createGeneratorChain(Class<? extends DatabaseObject> databaseObjectType,
Database database) |
<DatabaseObjectType extends DatabaseObject> |
get(Class<DatabaseObjectType> type)
Returns all objects of the given type that are already included in this snapshot.
|
<DatabaseObjectType extends DatabaseObject> |
get(DatabaseObjectType example)
Returns the object described by the passed example if it is already included in this snapshot.
|
Database |
getDatabase() |
Map<String,Object> |
getMetadata() |
liquibase.snapshot.ResultSetCache |
getResultSetCache(String key) |
CompareControl.SchemaComparison[] |
getSchemaComparisons() |
Object |
getScratchData(String key)
Deprecated.
Will be removed with 4.0
|
String |
getSerializableFieldNamespace(String field) |
Set<String> |
getSerializableFields() |
LiquibaseSerializable.SerializationType |
getSerializableFieldType(String field) |
Object |
getSerializableFieldValue(String field) |
String |
getSerializedObjectName() |
String |
getSerializedObjectNamespace() |
SnapshotControl |
getSnapshotControl() |
protected <T extends DatabaseObject> |
include(T example)
Include the object described by the passed example object in this snapshot.
|
protected void |
init(DatabaseObject[] examples) |
protected boolean |
isWrongCatalog(DatabaseObject fieldValue) |
protected boolean |
isWrongSchema(DatabaseObject fieldValue) |
void |
load(ParsedNode parsedNode,
ResourceAccessor resourceAccessor) |
protected void |
loadObjects(Map<String,DatabaseObject> objectMap,
Map<String,DatabaseObject> allObjects,
ParsedNode node,
ResourceAccessor resourceAccessor) |
ParsedNode |
serialize() |
void |
setMetadata(Map<String,Object> metadata) |
void |
setSchemaComparisons(CompareControl.SchemaComparison[] schemaComparisons) |
Object |
setScratchData(String key,
Object data) |
public static final String ALL_CATALOGS_STRING_SCRATCH_KEY
public DatabaseSnapshot(DatabaseObject[] examples, Database database) throws DatabaseException, InvalidExampleException
protected void init(DatabaseObject[] examples) throws DatabaseException, InvalidExampleException
public DatabaseSnapshot clone(DatabaseObject[] examples)
examples
- The array of snapshot objects to search and clonepublic SnapshotControl getSnapshotControl()
public String getSerializedObjectName()
getSerializedObjectName
in interface LiquibaseSerializable
public String getSerializedObjectNamespace()
getSerializedObjectNamespace
in interface LiquibaseSerializable
public String getSerializableFieldNamespace(String field)
getSerializableFieldNamespace
in interface LiquibaseSerializable
public Set<String> getSerializableFields()
getSerializableFields
in interface LiquibaseSerializable
public Object getSerializableFieldValue(String field)
getSerializableFieldValue
in interface LiquibaseSerializable
public LiquibaseSerializable.SerializationType getSerializableFieldType(String field)
getSerializableFieldType
in interface LiquibaseSerializable
public Database getDatabase()
public liquibase.snapshot.ResultSetCache getResultSetCache(String key)
protected <T extends DatabaseObject> T include(T example) throws DatabaseException, InvalidExampleException
protected boolean isWrongSchema(DatabaseObject fieldValue)
protected boolean isWrongCatalog(DatabaseObject fieldValue)
public <DatabaseObjectType extends DatabaseObject> DatabaseObjectType get(DatabaseObjectType example)
public <DatabaseObjectType extends DatabaseObject> Set<DatabaseObjectType> get(Class<DatabaseObjectType> type)
protected SnapshotGeneratorChain createGeneratorChain(Class<? extends DatabaseObject> databaseObjectType, Database database)
public void load(ParsedNode parsedNode, ResourceAccessor resourceAccessor) throws ParsedNodeException
load
in interface LiquibaseSerializable
ParsedNodeException
protected void loadObjects(Map<String,DatabaseObject> objectMap, Map<String,DatabaseObject> allObjects, ParsedNode node, ResourceAccessor resourceAccessor) throws ClassNotFoundException, InstantiationException, IllegalAccessException, ParsedNodeException
public ParsedNode serialize()
serialize
in interface LiquibaseSerializable
public Object getScratchData(String key)
public CompareControl.SchemaComparison[] getSchemaComparisons()
public void setSchemaComparisons(CompareControl.SchemaComparison[] schemaComparisons)
Copyright © 2018 Liquibase.org. All rights reserved.