Top Description Fields Constructors Methods
liquibase.change

public Class ChangeMetaData

extends Object
implements PrioritizedService
Class Inheritance
All Implemented Interfaces
liquibase.servicelocator.PrioritizedService
Imports
liquibase.database.Database, liquibase.servicelocator.PrioritizedService, liquibase.structure.DatabaseObject, java.util.*

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
ChangeParameterMetaData

Field Summary

Modifier and TypeField and Description
private Set<String>
private final HashMap<String, String>
private final String
private final String
private Map<String, ChangeParameterMetaData>
private final int
public static final int

Constructor Summary

AccessConstructor and Description
public
ChangeMetaData(String name, String description, int priority, String[] appliesTo, Map<String, String> databaseNotes, Set<ChangeParameterMetaData> parameters)

Method Summary

Modifier and TypeMethod and Description
public boolean
appliesTo(DatabaseObject databaseObject)

public Set<String>
getAppliesTo()

Returns the types of DatabaseObjects this change would apply to.

public String
getDescription()

A description of the Change for documentation purposes.

public String
getName()

Return the name of the change used to identify it.

public String
getNotes(String database)

public Map<String, ChangeParameterMetaData>
getOptionalParameters(Database database)

Returns the optional parameters for this change for the given database.

public Map<String, ChangeParameterMetaData>
getParameters()

Return the parameters of this Change.

public int
getPriority()

Implements liquibase.servicelocator.PrioritizedService.getPriority.

The priority of a Change implementation controls which implementation is used if several exist for the same "name".

public Map<String, ChangeParameterMetaData>
getRequiredParameters(Database database)

Returns the required parameters for this change for the given database.

public Map<String, ChangeParameterMetaData>
getSetParameters(Change change)

Return the parameters of the given change that are set to a non-null value.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

appliesToback to summary
private Set<String> appliesTo
databaseNotesback to summary
private final HashMap<String, String> databaseNotes
descriptionback to summary
private final String description
nameback to summary
private final String name
parametersback to summary
private Map<String, ChangeParameterMetaData> parameters
priorityback to summary
private final int priority
PRIORITY_DEFAULTback to summary
public static final int PRIORITY_DEFAULT

Hides liquibase.servicelocator.PrioritizedService.PRIORITY_DEFAULT.

Constructor Detail

ChangeMetaDataback to summary
public ChangeMetaData(String name, String description, int priority, String[] appliesTo, Map<String, String> databaseNotes, Set<ChangeParameterMetaData> parameters)

Method Detail

appliesToback to summary
public boolean appliesTo(DatabaseObject databaseObject)
getAppliesToback to summary
public Set<String> 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 by liquibase.structure.DatabaseObject#getObjectTypeName()

getDescriptionback to summary
public String getDescription()

A description of the Change for documentation purposes.

getNameback to summary
public String 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.

getNotesback to summary
public String getNotes(String database)
getOptionalParametersback to summary
public Map<String, ChangeParameterMetaData> getOptionalParameters(Database database)

Returns the optional parameters for this change for the given database. Will never return a null map, only an empty or populated map.

getParametersback to summary
public Map<String, ChangeParameterMetaData> getParameters()

Return the parameters of this Change. Will never return a null map, only an empty or populated map.

getPriorityback to summary
public int getPriority()

Implements liquibase.servicelocator.PrioritizedService.getPriority.

The priority of a Change implementation controls which implementation is used if several exist for the same "name".

Annotations
@Override
getRequiredParametersback to summary
public Map<String, ChangeParameterMetaData> getRequiredParameters(Database database)

Returns the required parameters for this change for the given database. Will never return a null map, only an empty or populated map.

getSetParametersback to summary
public Map<String, ChangeParameterMetaData> getSetParameters(Change change)

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.