Change implementations. You can implement Change directly, this class is
purely for convenience but recommended.
By default, this base class relies on annotations such as DatabaseChange and DatabaseChangeProperty
and delegating logic to the liquibase.sqlgenerator.SqlGenerator objects created to do the actual change work.
Place the @DatabaseChangeProperty annotations on the read "get" methods to control property metadata.
| Modifier and Type | Field and Description |
|---|---|
| private ChangeSet | |
| protected static final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public ChangeStatus | checkStatus(Database database)
Implements liquibase. Validate that this change executed successfully against the given database. |
| public ChangeMetaData | createChangeMetaData()
Implements liquibase. Generate the ChangeMetaData for this class. |
| protected ChangeParameterMetaData | createChangeParameterMetadata(String parameterName)
Called by |
| private ChangeParameterMetaData | |
| protected String | createDescriptionMetaData(String parameterName, DatabaseChangeProperty changePropertyAnnotation)
Create the |
| protected ColumnConfig | |
| protected Map | createExampleValueMetaData(String parameterName, DatabaseChangeProperty changePropertyAnnotation)
Create the |
| protected Change[] | Returns: Return null if there is no corresponding inverse and therefore automatic rollback is not possible. Return an empty array to have a no-op rollback.Create inverse changes that can roll back this change. |
| protected String | createMustEqualExistingMetaData(String parameterName, DatabaseChangeProperty changePropertyAnnotation)
Create the |
| protected String[] | createRequiredDatabasesMetaData(String parameterName, DatabaseChangeProperty changePropertyAnnotation)
Create the |
| protected LiquibaseSerializable. | createSerializationTypeMetaData(String parameterName, DatabaseChangeProperty changePropertyAnnotation)
Create the |
| protected String | createSinceMetaData(String parameterName, DatabaseChangeProperty changePropertyAnnotation)
Create the |
| protected String[] | createSupportedDatabasesMetaData(String parameterName, DatabaseChangeProperty changePropertyAnnotation)
Create the |
| protected void | |
| public boolean | equals(Object
the reference object with which to compare. reference)Overrides liquibase. Default implementation counts objects equal if their describe() methods return equal strings. |
| private DatabaseChangeProperty | findDatabaseChangePropertyAnnotationMatchingCurrentChecksumVersion(Method readMethod)
Given a particular method, find the |
| public void | finishInitialization()
Implements liquibase. Default implementation is a no-op |
| public CheckSum | generateCheckSum()
Implements liquibase. Implementation generates checksum by serializing the change with |
| public SqlStatement[] | generateRollbackStatements(Database database)
Implements liquibase. Implementation relies on value returned from |
| private SqlStatement[] | |
| public boolean | generateRollbackStatementsVolatile(Database database)
Implements liquibase. Implementation delegates logic to the
|
| public boolean | generateStatementsVolatile(Database database)
Implements liquibase. Implementation delegates logic to the
|
| public Set | getAffectedDatabaseObjects(Database database)
Implements liquibase. Implementation delegates logic to the
|
| public ChangeSet | getChangeSet()
Implements liquibase. Returns the changeSet this Change is part of. |
| public String | getDescription()
Implements liquibase. Short, scannable description for the DATABASECHANGELOG.DESCRIPTION column |
| public String[] | |
| public ResourceAccessor | |
| public String | |
| public Set | getSerializableFields()
Implements liquibase. Returns the fields on this change that are serializable. |
| public LiquibaseSerializable. | |
| public Object | |
| public String | |
| public String | |
| public int | hashCode()
Overrides liquibase. Returns a hash code value for this object. |
| protected boolean | |
| public void | load(ParsedNode parsedNode, ResourceAccessor resourceAccessor)
Implements liquibase.
|
| public void | |
| public ParsedNode | |
| protected Object | |
| public void | setChangeSet(ChangeSet changeSet)
Implements liquibase. Sets the changeSet this Change is a part of. |
| public void | setResourceAccessor(ResourceAccessor resourceAccessor)
Implements liquibase. Sets the |
| public boolean | Returns: booleanDatabase we are working on database)Return if this change should execute |
| public boolean | supports(Database database)
Implements liquibase. Implementation delegates logic to the
|
| public boolean | supportsRollback(Database database)
Implements liquibase. Implementation returns true if |
| public String | toString()
Overrides liquibase. Returns a string representation of the object. |
| public ValidationErrors | validate(Database database)
Implements liquibase. Implementation checks the ChangeParameterMetaData for declared required fields
and also delegates logic to the
|
| public Warnings | warn(Database database)
Implements liquibase. Implementation delegates logic to the
|
| changeSet | back to summary |
|---|---|
| private ChangeSet changeSet | |
| NODENAME_COLUMN | back to summary |
|---|---|
| protected static final String NODENAME_COLUMN | |
| AbstractChange | back to summary |
|---|---|
| public AbstractChange() | |
| checkStatus | back to summary |
|---|---|
| public ChangeStatus checkStatus(Database database) Implements liquibase. Doc from liquibase. Validate that this change executed successfully against the given database. This will check that the update completed at a high level plus check details of the change. For example, a change to add a column will check that the column exists plus data type, default values, etc.
| |
| createChangeMetaData | back to summary |
|---|---|
| public ChangeMetaData createChangeMetaData() Implements liquibase. Generate the ChangeMetaData for this class. Default implementation reads from the @
| |
| createChangeParameterMetadata | back to summary |
|---|---|
| protected ChangeParameterMetaData createChangeParameterMetadata(String parameterName) Called by
| |
| createChangeParameterMetadata | back to summary |
|---|---|
| private ChangeParameterMetaData createChangeParameterMetadata(PropertyDescriptor property, Method readMethod) | |
| createDescriptionMetaData | back to summary |
|---|---|
| protected String createDescriptionMetaData(String parameterName, DatabaseChangeProperty changePropertyAnnotation) Create the
| |
| createEmptyColumnConfig | back to summary |
|---|---|
| protected ColumnConfig createEmptyColumnConfig(Class<T> collectionType) throws ReflectiveOperationException | |
| createExampleValueMetaData | back to summary |
|---|---|
| protected Map Create the
| |
| createInverses | back to summary |
|---|---|
| protected Change[] createInverses() Create inverse changes that can roll back this change. This method is intended to be overridden by Change implementations that have a logical inverse operation. Default implementation returns null.
If
| |
| createMustEqualExistingMetaData | back to summary |
|---|---|
| protected String createMustEqualExistingMetaData(String parameterName, DatabaseChangeProperty changePropertyAnnotation) Create the
| |
| createRequiredDatabasesMetaData | back to summary |
|---|---|
| protected String[] createRequiredDatabasesMetaData(String parameterName, DatabaseChangeProperty changePropertyAnnotation) Create the
| |
| createSerializationTypeMetaData | back to summary |
|---|---|
| protected LiquibaseSerializable. Create the
| |
| createSinceMetaData | back to summary |
|---|---|
| protected String createSinceMetaData(String parameterName, DatabaseChangeProperty changePropertyAnnotation) Create the
| |
| createSupportedDatabasesMetaData | back to summary |
|---|---|
| protected String[] createSupportedDatabasesMetaData(String parameterName, DatabaseChangeProperty changePropertyAnnotation) Create the
| |
| customLoadLogic | back to summary |
|---|---|
| protected void customLoadLogic(ParsedNode parsedNode, ResourceAccessor resourceAccessor) throws ParsedNodeException | |
| equals | back to summary |
|---|---|
| public boolean equals(Object reference) Overrides liquibase. Doc from liquibase. Default implementation counts objects equal if their describe() methods return equal strings.
| |
| findDatabaseChangePropertyAnnotationMatchingCurrentChecksumVersion | back to summary |
|---|---|
| private DatabaseChangeProperty findDatabaseChangePropertyAnnotationMatchingCurrentChecksumVersion(Method readMethod) Given a particular method, find the | |
| finishInitialization | back to summary |
|---|---|
| public void finishInitialization() throws SetupException Implements liquibase. Default implementation is a no-op
| |
| generateCheckSum | back to summary |
|---|---|
| public CheckSum generateCheckSum() Implements liquibase. Implementation generates checksum by serializing the change with
| |
| generateRollbackStatements | back to summary |
|---|---|
| public SqlStatement[] generateRollbackStatements(Database database) throws RollbackImpossibleException Implements liquibase. Implementation relies on value returned from
| |
| generateRollbackStatementsFromInverse | back to summary |
|---|---|
| private SqlStatement[] generateRollbackStatementsFromInverse(Database database) throws RollbackImpossibleException | |
| generateRollbackStatementsVolatile | back to summary |
|---|---|
| public boolean generateRollbackStatementsVolatile(Database database) Implements liquibase. Implementation delegates logic to the
| |
| generateStatementsVolatile | back to summary |
|---|---|
| public boolean generateStatementsVolatile(Database database) Implements liquibase. Implementation delegates logic to the
| |
| getAffectedDatabaseObjects | back to summary |
|---|---|
| public Set Implements liquibase. Implementation delegates logic to the
| |
| getChangeSet | back to summary |
|---|---|
| public ChangeSet getChangeSet() Implements liquibase. Doc from liquibase. Returns the changeSet this Change is part of. Will return null if this instance was not constructed as part of a changelog file.
| |
| getDescription | back to summary |
|---|---|
| public String getDescription() Implements liquibase. Doc from liquibase. Short, scannable description for the DATABASECHANGELOG.DESCRIPTION column
| |
| getExcludedFieldFilters | back to summary |
|---|---|
| public String[] getExcludedFieldFilters(ChecksumVersion version) | |
| getResourceAccessor | back to summary |
|---|---|
| public ResourceAccessor getResourceAccessor()
Deprecated Should get from
| |
| getSerializableFieldNamespace | back to summary |
|---|---|
| public String getSerializableFieldNamespace(String field) Implements liquibase.
| |
| getSerializableFields | back to summary |
|---|---|
| public Set Implements liquibase. Returns the fields on this change that are serializable.
| |
| getSerializableFieldType | back to summary |
|---|---|
| public LiquibaseSerializable. Implements liquibase.
| |
| getSerializableFieldValue | back to summary |
|---|---|
| public Object getSerializableFieldValue(String field) Implements liquibase.
| |
| getSerializedObjectName | back to summary |
|---|---|
| public String getSerializedObjectName() Implements liquibase.
| |
| getSerializedObjectNamespace | back to summary |
|---|---|
| public String getSerializedObjectNamespace() Implements liquibase.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides liquibase. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isInvalidProperty | back to summary |
|---|---|
| protected boolean isInvalidProperty(PropertyDescriptor property) | |
| load | back to summary |
|---|---|
| public void load(ParsedNode parsedNode, ResourceAccessor resourceAccessor) throws ParsedNodeException Implements liquibase.
| |
| modify | back to summary |
|---|---|
| public void modify(ChangeVisitor changeVisitor) throws ParsedNodeException Implements liquibase.
| |
| serialize | back to summary |
|---|---|
| public ParsedNode serialize() throws ParsedNodeException Implements liquibase.
| |
| serializeValue | back to summary |
|---|---|
| protected Object serializeValue(Object value) throws ParsedNodeException | |
| setChangeSet | back to summary |
|---|---|
| public void setChangeSet(ChangeSet changeSet) Implements liquibase. Doc from liquibase. Sets the changeSet this Change is a part of. Called automatically by Liquibase during the changelog parsing process.
| |
| setResourceAccessor | back to summary |
|---|---|
| public void setResourceAccessor(ResourceAccessor resourceAccessor) Implements liquibase. Doc from liquibase. Sets the
| |
| shouldExecuteChange | back to summary |
|---|---|
| public boolean shouldExecuteChange(Database database) Return if this change should execute
| |
| supports | back to summary |
|---|---|
| public boolean supports(Database database) Implements liquibase. Implementation delegates logic to the
| |
| supportsRollback | back to summary |
|---|---|
| public boolean supportsRollback(Database database) Implements liquibase. Implementation returns true if
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides liquibase. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| validate | back to summary |
|---|---|
| public ValidationErrors validate(Database database) Implements liquibase. Implementation checks the ChangeParameterMetaData for declared required fields
and also delegates logic to the
| |
| warn | back to summary |
|---|---|
| public Warnings warn(Database database) Implements liquibase. Implementation delegates logic to the
| |