Package liquibase.changelog
Class DatabaseChangeLog
java.lang.Object
liquibase.changelog.DatabaseChangeLog
- All Implemented Interfaces:
- Comparable<DatabaseChangeLog>,- Conditional
Encapsulates the information stored in the change log XML file.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumControls what to do when including a file with a format that isn't recognized by a changelog parser.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddChangeSet(ChangeSet changeSet) voidintprotected ChangeSetcreateChangeSet(ParsedNode node, ResourceAccessor resourceAccessor) determineResourceComparator(String resourceComparatorDef) booleanprotected voidexpandExpressions(ParsedNode parsedNode) findResources(String pathName, boolean isRelativeToChangelogFile, IncludeAllFilter resourceFilter, boolean errorIfMissingOrEmpty, Comparator<String> resourceComparator, ResourceAccessor resourceAccessor, int minDepth, int maxDepth) Deprecated.findResources(String pathName, boolean isRelativeToChangelogFile, IncludeAllFilter resourceFilter, boolean errorIfMissingOrEmpty, Comparator<String> resourceComparator, ResourceAccessor resourceAccessor, int minDepth, int maxDepth, String endsWithFilter) getChangeSet(String path, String author, String id) getChangeSet(RanChangeSet ranChangeSet) getChangeSets(String path, String author, String id) getChangeSets(RanChangeSet ranChangeSet) Deprecated.use#getContextFilter()protected Comparator<String>protected voidhandleChildNode(ParsedNode node, ResourceAccessor resourceAccessor) protected voidhandleChildNode(ParsedNode node, ResourceAccessor resourceAccessor, Map<String, Object> nodeScratch) voidhandleChildNodeHelper(ParsedNode node, ResourceAccessor resourceAccessor, Map<String, Object> nodeScratch) inthashCode()booleaninclude(String fileName, boolean isRelativePath, boolean errorIfMissing, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, LabelExpression labelExpression, Boolean ignore, boolean logEveryUnknownFileFormat) booleaninclude(String fileName, boolean isRelativePath, boolean errorIfMissing, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, Boolean ignore, boolean logEveryUnknownFileFormat) booleaninclude(String fileName, boolean isRelativePath, boolean errorIfMissing, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, Boolean ignore, String logicalFilePath, DatabaseChangeLog.OnUnknownFileFormat onUnknownFileFormat) booleaninclude(String fileName, boolean isRelativePath, boolean errorIfMissing, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, Boolean ignore, String logicalFilePath, DatabaseChangeLog.OnUnknownFileFormat onUnknownFileFormat, ModifyChangeSets modifyChangeSets) booleaninclude(String fileName, boolean isRelativePath, boolean errorIfMissing, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, Boolean ignore, DatabaseChangeLog.OnUnknownFileFormat onUnknownFileFormat) voidincludeAll(String pathName, boolean isRelativeToChangelogFile, IncludeAllFilter resourceFilter, boolean errorIfMissingOrEmpty, Comparator<String> resourceComparator, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, LabelExpression labelExpression, boolean ignore) voidincludeAll(String pathName, boolean isRelativeToChangelogFile, IncludeAllFilter resourceFilter, boolean errorIfMissingOrEmpty, Comparator<String> resourceComparator, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, boolean ignore, int minDepth, int maxDepth, ModifyChangeSets modifyChangeSets) Deprecated.voidincludeAll(String pathName, boolean isRelativeToChangelogFile, IncludeAllFilter resourceFilter, boolean errorIfMissingOrEmpty, Comparator<String> resourceComparator, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, boolean ignore, String logicalFilePath, int minDepth, int maxDepth) voidincludeAll(String pathName, boolean isRelativeToChangelogFile, IncludeAllFilter resourceFilter, boolean errorIfMissingOrEmpty, Comparator<String> resourceComparator, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, boolean ignore, String logicalFilePath, int minDepth, int maxDepth, String endsWithFilter, ModifyChangeSets modifyChangeSets) booleanisDbmsMatch(String dbmsList) booleanisDbmsMatch(Set<String> dbmsSet) voidload(ParsedNode parsedNode, ResourceAccessor resourceAccessor) static StringnormalizePath(String filePath) voidsetChangeLogParameters(ChangeLogParameters changeLogParameters) voidsetContextFilter(ContextExpression contextFilter) voidsetContexts(ContextExpression contexts) Deprecated.voidsetIncludeContextFilter(ContextExpression includeContextFilter) voidsetIncludeContexts(ContextExpression includeContexts) Deprecated.voidsetIncludeIgnore(boolean ignore) voidsetIncludeLabels(LabelExpression labels) Deprecated.Correct version issetIncludeLabels(Labels).voidsetIncludeLabels(Labels labels) voidsetLogicalFilePath(String logicalFilePath) voidsetObjectQuotingStrategy(ObjectQuotingStrategy objectQuotingStrategy) voidsetParentChangeLog(DatabaseChangeLog parentChangeLog) voidsetPhysicalFilePath(String physicalFilePath) voidsetPreconditions(PreconditionContainer precondition) voidsetRootChangeLog(DatabaseChangeLog rootChangeLog) voidsetRuntimeEnvironment(RuntimeEnvironment runtimeEnvironment) toString()voidvoidvalidate(Database database, Contexts contexts, LabelExpression labelExpression) 
- 
Field Details- 
SEEN_CHANGELOGS_PATHS_SCOPE_KEY- See Also:
 
- 
FILE- See Also:
 
- 
CONTEXT_FILTER- See Also:
 
- 
CONTEXT- See Also:
 
- 
LABELS- See Also:
 
- 
IGNORE- See Also:
 
- 
RELATIVE_TO_CHANGELOG_FILE- See Also:
 
- 
LOGICAL_FILE_PATH- See Also:
 
- 
ERROR_IF_MISSING- See Also:
 
- 
MODIFY_CHANGE_SETS- See Also:
 
- 
PATH- See Also:
 
- 
FILTER- See Also:
 
- 
RESOURCE_FILTER- See Also:
 
- 
RESOURCE_COMPARATOR- See Also:
 
- 
MIN_DEPTH- See Also:
 
- 
MAX_DEPTH- See Also:
 
- 
ENDS_WITH_FILTER- See Also:
 
- 
ERROR_IF_MISSING_OR_EMPTY- See Also:
 
- 
CHANGE_SET- See Also:
 
- 
DBMS- See Also:
 
- 
INCLUDE_CHANGELOG- See Also:
 
- 
INCLUDE_ALL_CHANGELOGS- See Also:
 
- 
PRE_CONDITIONS- See Also:
 
- 
REMOVE_CHANGE_SET_PROPERTY- See Also:
 
- 
PROPERTY- See Also:
 
- 
NAME- See Also:
 
- 
VALUE- See Also:
 
- 
GLOBAL- See Also:
 
 
- 
- 
Constructor Details- 
DatabaseChangeLogpublic DatabaseChangeLog()
- 
DatabaseChangeLog
 
- 
- 
Method Details- 
setRootChangeLog
- 
getRootChangeLog
- 
setParentChangeLog
- 
setRuntimeEnvironment
- 
getPreconditions- Specified by:
- getPreconditionsin interface- Conditional
 
- 
setPreconditions- Specified by:
- setPreconditionsin interface- Conditional
 
- 
setChangeLogParameters
- 
setPhysicalFilePath
- 
getRawLogicalFilePath
- 
getLogicalFilePath
- 
setLogicalFilePath
- 
getFilePath
- 
setObjectQuotingStrategy
- 
getContextsDeprecated.use#getContextFilter()
- 
setContextsDeprecated.
- 
setContextFilter
- 
setIncludeLabelsDeprecated.Correct version issetIncludeLabels(Labels). Kept for backwards compatibility.
- 
setIncludeLabels
- 
setIncludeIgnorepublic void setIncludeIgnore(boolean ignore) 
- 
setIncludeContextsDeprecated.
- 
setIncludeContextFilter
- 
toString
- 
compareTo- Specified by:
- compareToin interface- Comparable<DatabaseChangeLog>
 
- 
getChangeSet
- 
getChangeSets
- 
addChangeSet
- 
equals
- 
hashCodepublic int hashCode()
- 
validate- Throws:
- LiquibaseException
 
- 
validatepublic void validate(Database database, Contexts contexts, LabelExpression labelExpression) throws LiquibaseException - Throws:
- LiquibaseException
 
- 
getChangeSet
- 
getChangeSets
- 
loadpublic void load(ParsedNode parsedNode, ResourceAccessor resourceAccessor) throws ParsedNodeException, SetupException - Throws:
- ParsedNodeException
- SetupException
 
- 
expandExpressions
- 
handleChildNodeprotected void handleChildNode(ParsedNode node, ResourceAccessor resourceAccessor) throws ParsedNodeException, SetupException - Throws:
- ParsedNodeException
- SetupException
 
- 
handleChildNodeprotected void handleChildNode(ParsedNode node, ResourceAccessor resourceAccessor, Map<String, Object> nodeScratch) throws ParsedNodeException, SetupException- Throws:
- ParsedNodeException
- SetupException
 
- 
handleChildNodeHelperpublic void handleChildNodeHelper(ParsedNode node, ResourceAccessor resourceAccessor, Map<String, Object> nodeScratch) throws ParsedNodeException, SetupException- Throws:
- ParsedNodeException
- SetupException
 
- 
determineResourceComparator
- 
isDbmsMatch
- 
isDbmsMatch
- 
includeAll@Deprecated public void includeAll(String pathName, boolean isRelativeToChangelogFile, IncludeAllFilter resourceFilter, boolean errorIfMissingOrEmpty, Comparator<String> resourceComparator, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, LabelExpression labelExpression, boolean ignore) throws SetupException Deprecated.- Throws:
- SetupException
 
- 
includeAllpublic void includeAll(String pathName, boolean isRelativeToChangelogFile, IncludeAllFilter resourceFilter, boolean errorIfMissingOrEmpty, Comparator<String> resourceComparator, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, boolean ignore, String logicalFilePath, int minDepth, int maxDepth) throws SetupException - Throws:
- SetupException
 
- 
includeAll@Deprecated public void includeAll(String pathName, boolean isRelativeToChangelogFile, IncludeAllFilter resourceFilter, boolean errorIfMissingOrEmpty, Comparator<String> resourceComparator, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, boolean ignore, int minDepth, int maxDepth, ModifyChangeSets modifyChangeSets) throws SetupException Deprecated.- Throws:
- SetupException
 
- 
includeAllpublic void includeAll(String pathName, boolean isRelativeToChangelogFile, IncludeAllFilter resourceFilter, boolean errorIfMissingOrEmpty, Comparator<String> resourceComparator, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, boolean ignore, String logicalFilePath, int minDepth, int maxDepth, String endsWithFilter, ModifyChangeSets modifyChangeSets) throws SetupException - Throws:
- SetupException
 
- 
findResources@Deprecated public SortedSet<Resource> findResources(String pathName, boolean isRelativeToChangelogFile, IncludeAllFilter resourceFilter, boolean errorIfMissingOrEmpty, Comparator<String> resourceComparator, ResourceAccessor resourceAccessor, int minDepth, int maxDepth) throws SetupException Deprecated.- Throws:
- SetupException
 
- 
findResourcespublic SortedSet<Resource> findResources(String pathName, boolean isRelativeToChangelogFile, IncludeAllFilter resourceFilter, boolean errorIfMissingOrEmpty, Comparator<String> resourceComparator, ResourceAccessor resourceAccessor, int minDepth, int maxDepth, String endsWithFilter) throws SetupException - Throws:
- SetupException
 
- 
include@Deprecated public boolean include(String fileName, boolean isRelativePath, boolean errorIfMissing, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, LabelExpression labelExpression, Boolean ignore, boolean logEveryUnknownFileFormat) throws LiquibaseException Deprecated.- Throws:
- LiquibaseException
 
- 
include@Deprecated public boolean include(String fileName, boolean isRelativePath, boolean errorIfMissing, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, Boolean ignore, boolean logEveryUnknownFileFormat) throws LiquibaseException Deprecated.- Throws:
- LiquibaseException
 
- 
includepublic boolean include(String fileName, boolean isRelativePath, boolean errorIfMissing, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, Boolean ignore, DatabaseChangeLog.OnUnknownFileFormat onUnknownFileFormat) throws LiquibaseException Deprecated.- Throws:
- LiquibaseException
 
- 
includepublic boolean include(String fileName, boolean isRelativePath, boolean errorIfMissing, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, Boolean ignore, String logicalFilePath, DatabaseChangeLog.OnUnknownFileFormat onUnknownFileFormat) throws LiquibaseException - Throws:
- LiquibaseException
 
- 
includepublic boolean include(String fileName, boolean isRelativePath, boolean errorIfMissing, ResourceAccessor resourceAccessor, ContextExpression includeContextFilter, Labels labels, Boolean ignore, String logicalFilePath, DatabaseChangeLog.OnUnknownFileFormat onUnknownFileFormat, ModifyChangeSets modifyChangeSets) throws LiquibaseException - Throws:
- LiquibaseException
 
- 
createChangeSetprotected ChangeSet createChangeSet(ParsedNode node, ResourceAccessor resourceAccessor) throws ParsedNodeException - Throws:
- ParsedNodeException
 
- 
getStandardChangeLogComparator
- 
normalizePath
- 
clearCheckSumspublic void clearCheckSums()
 
- 
include(String, boolean, boolean, ResourceAccessor, ContextExpression, Labels, Boolean, String, OnUnknownFileFormat)