Package liquibase.change
Class ChangeMetaData
java.lang.Object
liquibase.change.ChangeMetaData
- All Implemented Interfaces:
PrioritizedService
Static metadata about a
link Change
.
This data is kept in a separate class to better separate the information about the change and the fields of the change.
It also ensures there will be no conflict between Change fields and metadata, such as "name".
ChangeMetaData instances are immutable.- See Also:
-
Field Summary
Fields inherited from interface liquibase.servicelocator.PrioritizedService
COMPARATOR, PRIORITY_DATABASE
-
Constructor Summary
ConstructorDescriptionChangeMetaData
(String name, String description, int priority, String[] appliesTo, Map<String, String> databaseNotes, Set<ChangeParameterMetaData> parameters) -
Method Summary
Modifier and TypeMethodDescriptionboolean
appliesTo
(DatabaseObject databaseObject) Returns the types of DatabaseObjects this change would apply to.A description of the Change for documentation purposes.getName()
Return the name of the change used to identify it.getOptionalParameters
(Database database) Returns the optional parameters for this change for the given database.Return the parameters of this Change.int
The priority of a Change implementation controls which implementation is used if several exist for the same "name".getRequiredParameters
(Database database) Returns the required parameters for this change for the given database.getSetParameters
(Change change) Return the parameters of the given change that are set to a non-null value.
-
Field Details
-
PRIORITY_DEFAULT
public static final int PRIORITY_DEFAULT- See Also:
-
-
Constructor Details
-
ChangeMetaData
-
-
Method Details
-
getName
Return the name of the change used to identify it. The name must not contain spaces since it will be used as tag names in XML etc. -
getDescription
A description of the Change for documentation purposes. -
getPriority
public int getPriority()The priority of a Change implementation controls which implementation is used if several exist for the same "name".- Specified by:
getPriority
in interfacePrioritizedService
-
getNotes
-
getParameters
Return the parameters of this Change. Will never return a null map, only an empty or populated map. -
getSetParameters
Return the parameters of the given change that are set to a non-null value. Will never return a null map, only an empty or populated map. -
getRequiredParameters
Returns the required parameters for this change for the given database. Will never return a null map, only an empty or populated map. -
getOptionalParameters
Returns the optional parameters for this change for the given database. Will never return a null map, only an empty or populated map. -
getAppliesTo
Returns the types of DatabaseObjects this change would apply to. Useful for documentation or integrations that present a user with what change commands are available for a given database type. If no information is known, returns null. Will never return an empty set, only null or a populated set. The string value will correspond to the values returned byDatabaseObject.getObjectTypeName()
-
appliesTo
-