public class ChangeMetaData extends Object implements PrioritizedService
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.ChangeParameterMetaData
Modifier and Type | Field and Description |
---|---|
static int |
PRIORITY_DEFAULT |
COMPARATOR, PRIORITY_DATABASE
Constructor and Description |
---|
ChangeMetaData(String name,
String description,
int priority,
String[] appliesTo,
Map<String,String> databaseNotes,
Set<ChangeParameterMetaData> parameters) |
Modifier and Type | Method and Description |
---|---|
boolean |
appliesTo(DatabaseObject databaseObject) |
Set<String> |
getAppliesTo()
Returns the types of DatabaseObjects this change would apply to.
|
String |
getDescription()
A description of the Change for documentation purposes.
|
String |
getName()
Return the name of the change used to identify it.
|
String |
getNotes(String database) |
Map<String,ChangeParameterMetaData> |
getOptionalParameters(Database database)
Returns the optional parameters for this change for the given database.
|
Map<String,ChangeParameterMetaData> |
getParameters()
Return the parameters of this Change.
|
int |
getPriority()
The priority of a Change implementation controls which implementation is used if several exist for the same "name".
|
Map<String,ChangeParameterMetaData> |
getRequiredParameters(Database database)
Returns the required parameters for this change for the given database.
|
Map<String,ChangeParameterMetaData> |
getSetParameters(Change change)
Return the parameters of the given change that are set to a non-null value.
|
public static final int PRIORITY_DEFAULT
public String getName()
public String getDescription()
public int getPriority()
getPriority
in interface PrioritizedService
public Map<String,ChangeParameterMetaData> getParameters()
public Map<String,ChangeParameterMetaData> getSetParameters(Change change)
public Map<String,ChangeParameterMetaData> getRequiredParameters(Database database)
public Map<String,ChangeParameterMetaData> getOptionalParameters(Database database)
public Set<String> getAppliesTo()
DatabaseObject.getObjectTypeName()
public boolean appliesTo(DatabaseObject databaseObject)
Copyright © 2023 Liquibase.org. All rights reserved.