|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Change
Interface all changes (refactorings) implement.
Instances of these objects are normally created via the ChangeFactory
by ChangeLogParser
implementations.
ChangeFactory
,
Database
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface liquibase.serializer.LiquibaseSerializable |
---|
LiquibaseSerializable.SerializationType |
Field Summary |
---|
Fields inherited from interface liquibase.serializer.LiquibaseSerializable |
---|
GENERIC_CHANGELOG_EXTENSION_NAMESPACE, GENERIC_SNAPSHOT_EXTENSION_NAMESPACE, STANDARD_CHANGELOG_NAMESPACE, STANDARD_SNAPSHOT_NAMESPACE |
Method Summary | |
---|---|
ChangeStatus |
checkStatus(Database database)
Validate that this change executed successfully against the given database. |
ChangeMetaData |
createChangeMetaData()
|
void |
finishInitialization()
This method will be called by the changlelog parsing process after all of the properties have been set to allow the task to do any additional initialization logic. |
CheckSum |
generateCheckSum()
Calculates the checksum of this Change based on the current configuration. |
SqlStatement[] |
generateRollbackStatements(Database database)
Generates the SqlStatement objects that would roll back the change. |
boolean |
generateRollbackStatementsVolatile(Database database)
Returns true if this change reads data from the database or other sources that would change during the course of an update in the generateRollbackStatements(Database) method. |
SqlStatement[] |
generateStatements(Database database)
Generates the SqlStatement objects required to run the change for the given database. |
boolean |
generateStatementsVolatile(Database database)
Returns true if this change reads data from the database or other sources that would change during the course of an update in the generateStatements(Database) method. |
Set<DatabaseObject> |
getAffectedDatabaseObjects(Database database)
Returns example DatabaseObject instances describing the objects affected by this change. |
ChangeSet |
getChangeSet()
Returns the changeSet this Change is part of. |
String |
getConfirmationMessage()
Confirmation message to be displayed after the change is executed. |
void |
setChangeSet(ChangeSet changeSet)
Sets the changeSet this Change is a part of. |
void |
setResourceAccessor(ResourceAccessor resourceAccessor)
Sets the ResourceAccessor that should be used for any file and/or resource loading needed by this Change. |
boolean |
supports(Database database)
Return true if this Change object supports the passed database. |
boolean |
supportsRollback(Database database)
Returns true if this change be rolled back for the given database. |
ValidationErrors |
validate(Database database)
Generate errors based on the configured Change instance. |
Warnings |
warn(Database database)
Generates warnings based on the configured Change instance. |
Methods inherited from interface liquibase.serializer.LiquibaseSerializable |
---|
getSerializableFieldNamespace, getSerializableFields, getSerializableFieldType, getSerializableFieldValue, getSerializedObjectName, getSerializedObjectNamespace, load, serialize |
Method Detail |
---|
void finishInitialization() throws SetupException
SetupException
ChangeMetaData createChangeMetaData()
ChangeSet getChangeSet()
void setChangeSet(ChangeSet changeSet)
void setResourceAccessor(ResourceAccessor resourceAccessor)
ResourceAccessor
that should be used for any file and/or resource loading needed by this Change.
Called automatically by Liquibase during the changelog parsing process.
boolean supports(Database database)
Warnings warn(Database database)
ValidationErrors validate(Database database)
Set<DatabaseObject> getAffectedDatabaseObjects(Database database)
DatabaseObject
instances describing the objects affected by this change.
This method is not called during the normal execution of a changelog, but but can be used as metadata for documentation or other integrations.
CheckSum generateCheckSum()
String getConfirmationMessage()
SqlStatement[] generateStatements(Database database)
SqlStatement
objects required to run the change for the given database.
NOTE: This method may be called multiple times throughout the changelog execution process and may be called in documentation generation and other integration points as well.
If this method reads from the current database state or uses any other logic that will be affected by whether previous changeSets have ran or not, you must return true from generateStatementsVolatile(liquibase.database.Database)
.
boolean generateStatementsVolatile(Database database)
generateStatements(Database)
method.
If true, this change cannot be used in an updateSql-style commands because Liquibase cannot know the SqlStatement
objects until all changeSets prior have been actually executed.
boolean supportsRollback(Database database)
SqlStatement[] generateRollbackStatements(Database database) throws RollbackImpossibleException
SqlStatement
objects that would roll back the change.
NOTE: This method may be called multiple times throughout the changelog execution process and may be called in documentation generation and other integration points as well.
If this method reads from the current database state or uses any other logic that will be affected by whether previous changeSets have been rolled back or not, you must return true from generateRollbackStatementsVolatile(liquibase.database.Database)
.
RollbackImpossibleException
- if rollback is not supported for this changeboolean generateRollbackStatementsVolatile(Database database)
generateRollbackStatements(Database)
method.
If true, this change cannot be used in an updateSql-style commands because Liquibase cannot know the SqlStatement
objects until all changeSets prior have been actually executed.
ChangeStatus checkStatus(Database database)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |