Top Description Fields Constructors Methods
liquibase.change

public Class ChangeFactory

extends AbstractPluginFactory<Change>
Class Inheritance
Imports
liquibase.ChecksumVersion, .Scope, liquibase.database.Database, liquibase.exception.UnexpectedLiquibaseException, liquibase.plugin.AbstractPluginFactory, .Plugin, liquibase.servicelocator.ServiceLocator, java.util.*, java.util.concurrent.ConcurrentHashMap

Factory class for constructing the correct liquibase.change.Change implementation based on a command name. For XML-based changelogs, the tag name is the command name. Change implementations are looked up via the ServiceLocator.
See Also
liquibase.change.Change

Field Summary

Modifier and TypeField and Description
private final Map<String, ChangeMetaData>
private boolean

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public Change
create(String name)

Create a new Change implementation for the given change name.

private String
public ChangeMetaData
public ChangeMetaData
public SortedSet<String>
getDefinedChanges()

Returns all defined changes in the registry.

public static ChangeFactory
public Map<String, Object>
protected Class<Change>
protected int
getPriority(Change obj, Object... args)

Implements abstract liquibase.plugin.AbstractPluginFactory.getPriority.

Returns the priority of the given object based on the passed args array.

public void
setPerformSupportsDatabaseValidation(boolean performSupportsDatabaseValidation)

Should the change be checked to see if it supports the current database?

public void
unregister(String name)

Unregister all instances of a given Change name.

Inherited from liquibase.plugin.AbstractPluginFactory:
findAllInstancesgetPlugingetPluginsregisterremoveInstance

Field Detail

cachedMetadataback to summary
private final Map<String, ChangeMetaData> cachedMetadata
performSupportsDatabaseValidationback to summary
private boolean performSupportsDatabaseValidation

Constructor Detail

ChangeFactoryback to summary
private ChangeFactory()

Method Detail

createback to summary
public Change create(String name)

Create a new Change implementation for the given change name. The class of the constructed object will be the Change implementation with the highest priority. Each call to create will return a new instance of the Change.

generateCacheKeyback to summary
private String generateCacheKey(Change change)
getChangeMetaDataback to summary
public ChangeMetaData getChangeMetaData(String change)
getChangeMetaDataback to summary
public ChangeMetaData getChangeMetaData(Change change)
getDefinedChangesback to summary
public SortedSet<String> getDefinedChanges()

Returns all defined changes in the registry. Returned set is not modifiable.

getInstanceback to summary
public static ChangeFactory getInstance()
getParametersback to summary
public Map<String, Object> getParameters(Change change)
getPluginClassback to summary
protected Class<Change> getPluginClass()

Implements abstract liquibase.plugin.AbstractPluginFactory.getPluginClass.

Annotations
@Override
getPriorityback to summary
protected int getPriority(Change obj, Object... args)

Implements abstract liquibase.plugin.AbstractPluginFactory.getPriority.

Doc from liquibase.plugin.AbstractPluginFactory.getPriority.

Returns the priority of the given object based on the passed args array. The args are created as part of the custom public getPlugin method in implementations are passed through getPlugin(Object...)

Annotations
@Override
setPerformSupportsDatabaseValidationback to summary
public void setPerformSupportsDatabaseValidation(boolean performSupportsDatabaseValidation)

Should the change be checked to see if it supports the current database? Default is true

unregisterback to summary
public void unregister(String name)

Unregister all instances of a given Change name. Normally used for testing, but can be called manually if needed.