liquibase.changelog
Class DatabaseChangeLog
java.lang.Object
liquibase.changelog.DatabaseChangeLog
- All Implemented Interfaces:
- Comparable<DatabaseChangeLog>, Conditional
public class DatabaseChangeLog
- extends Object
- implements Comparable<DatabaseChangeLog>, Conditional
Encapsulates the information stored in the change log XML file.
Method Summary |
void |
addChangeSet(ChangeSet changeSet)
|
int |
compareTo(DatabaseChangeLog o)
|
protected ChangeSet |
createChangeSet(ParsedNode node,
ResourceAccessor resourceAccessor)
|
boolean |
equals(Object o)
|
protected void |
expandExpressions(ParsedNode parsedNode)
|
ChangeLogParameters |
getChangeLogParameters()
|
ChangeSet |
getChangeSet(RanChangeSet ranChangeSet)
|
ChangeSet |
getChangeSet(String path,
String author,
String id)
|
List<ChangeSet> |
getChangeSets()
|
ContextExpression |
getContexts()
|
String |
getFilePath()
|
ContextExpression |
getIncludeContexts()
|
String |
getLogicalFilePath()
|
ObjectQuotingStrategy |
getObjectQuotingStrategy()
|
DatabaseChangeLog |
getParentChangeLog()
|
String |
getPhysicalFilePath()
|
PreconditionContainer |
getPreconditions()
|
DatabaseChangeLog |
getRootChangeLog()
|
RuntimeEnvironment |
getRuntimeEnvironment()
|
protected Comparator<String> |
getStandardChangeLogComparator()
|
protected void |
handleChildNode(ParsedNode node,
ResourceAccessor resourceAccessor)
|
int |
hashCode()
|
boolean |
ignoreClasspathPrefix()
|
boolean |
include(String fileName,
boolean isRelativePath,
ResourceAccessor resourceAccessor,
ContextExpression includeContexts)
|
void |
includeAll(String pathName,
boolean isRelativeToChangelogFile,
IncludeAllFilter resourceFilter,
boolean errorIfMissingOrEmpty,
Comparator<String> resourceComparator,
ResourceAccessor resourceAccessor,
ContextExpression includeContexts)
|
void |
load(ParsedNode parsedNode,
ResourceAccessor resourceAccessor)
|
protected String |
normalizePath(String filePath)
|
void |
setChangeLogParameters(ChangeLogParameters changeLogParameters)
|
void |
setContexts(ContextExpression contexts)
|
void |
setIgnoreClasspathPrefix(boolean ignoreClasspathPrefix)
|
void |
setIncludeContexts(ContextExpression includeContexts)
|
void |
setLogicalFilePath(String logicalFilePath)
|
void |
setObjectQuotingStrategy(ObjectQuotingStrategy objectQuotingStrategy)
|
void |
setPhysicalFilePath(String physicalFilePath)
|
void |
setPreconditions(PreconditionContainer precond)
|
void |
setRuntimeEnvironment(RuntimeEnvironment runtimeEnvironment)
|
String |
toString()
|
void |
validate(Database database,
Contexts contexts)
Deprecated. Use LabelExpression version |
void |
validate(Database database,
Contexts contexts,
LabelExpression labelExpression)
|
void |
validate(Database database,
String... contexts)
|
DatabaseChangeLog
public DatabaseChangeLog()
DatabaseChangeLog
public DatabaseChangeLog(String physicalFilePath)
getRootChangeLog
public DatabaseChangeLog getRootChangeLog()
getParentChangeLog
public DatabaseChangeLog getParentChangeLog()
getRuntimeEnvironment
public RuntimeEnvironment getRuntimeEnvironment()
setRuntimeEnvironment
public void setRuntimeEnvironment(RuntimeEnvironment runtimeEnvironment)
getPreconditions
public PreconditionContainer getPreconditions()
- Specified by:
getPreconditions
in interface Conditional
setPreconditions
public void setPreconditions(PreconditionContainer precond)
- Specified by:
setPreconditions
in interface Conditional
getChangeLogParameters
public ChangeLogParameters getChangeLogParameters()
setChangeLogParameters
public void setChangeLogParameters(ChangeLogParameters changeLogParameters)
getPhysicalFilePath
public String getPhysicalFilePath()
setPhysicalFilePath
public void setPhysicalFilePath(String physicalFilePath)
getLogicalFilePath
public String getLogicalFilePath()
setLogicalFilePath
public void setLogicalFilePath(String logicalFilePath)
getFilePath
public String getFilePath()
getObjectQuotingStrategy
public ObjectQuotingStrategy getObjectQuotingStrategy()
setObjectQuotingStrategy
public void setObjectQuotingStrategy(ObjectQuotingStrategy objectQuotingStrategy)
getContexts
public ContextExpression getContexts()
setContexts
public void setContexts(ContextExpression contexts)
getIncludeContexts
public ContextExpression getIncludeContexts()
setIncludeContexts
public void setIncludeContexts(ContextExpression includeContexts)
toString
public String toString()
- Overrides:
toString
in class Object
compareTo
public int compareTo(DatabaseChangeLog o)
- Specified by:
compareTo
in interface Comparable<DatabaseChangeLog>
getChangeSet
public ChangeSet getChangeSet(String path,
String author,
String id)
getChangeSets
public List<ChangeSet> getChangeSets()
addChangeSet
public void addChangeSet(ChangeSet changeSet)
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
validate
public void validate(Database database,
String... contexts)
throws LiquibaseException
- Throws:
LiquibaseException
validate
public void validate(Database database,
Contexts contexts)
throws LiquibaseException
- Deprecated. Use LabelExpression version
- Throws:
LiquibaseException
validate
public void validate(Database database,
Contexts contexts,
LabelExpression labelExpression)
throws LiquibaseException
- Throws:
LiquibaseException
getChangeSet
public ChangeSet getChangeSet(RanChangeSet ranChangeSet)
load
public void load(ParsedNode parsedNode,
ResourceAccessor resourceAccessor)
throws ParsedNodeException,
SetupException
- Throws:
ParsedNodeException
SetupException
expandExpressions
protected void expandExpressions(ParsedNode parsedNode)
handleChildNode
protected void handleChildNode(ParsedNode node,
ResourceAccessor resourceAccessor)
throws ParsedNodeException,
SetupException
- Throws:
ParsedNodeException
SetupException
includeAll
public void includeAll(String pathName,
boolean isRelativeToChangelogFile,
IncludeAllFilter resourceFilter,
boolean errorIfMissingOrEmpty,
Comparator<String> resourceComparator,
ResourceAccessor resourceAccessor,
ContextExpression includeContexts)
throws SetupException
- Throws:
SetupException
include
public boolean include(String fileName,
boolean isRelativePath,
ResourceAccessor resourceAccessor,
ContextExpression includeContexts)
throws LiquibaseException
- Throws:
LiquibaseException
createChangeSet
protected ChangeSet createChangeSet(ParsedNode node,
ResourceAccessor resourceAccessor)
throws ParsedNodeException,
SetupException
- Throws:
ParsedNodeException
SetupException
getStandardChangeLogComparator
protected Comparator<String> getStandardChangeLogComparator()
setIgnoreClasspathPrefix
public void setIgnoreClasspathPrefix(boolean ignoreClasspathPrefix)
ignoreClasspathPrefix
public boolean ignoreClasspathPrefix()
normalizePath
protected String normalizePath(String filePath)
Copyright © 2016 Liquibase.org. All rights reserved.