Package liquibase.changelog
Class AbstractChangeLogHistoryService
- java.lang.Object
-
- liquibase.changelog.AbstractChangeLogHistoryService
-
- All Implemented Interfaces:
ChangeLogHistoryService,Plugin
- Direct Known Subclasses:
OfflineChangeLogHistoryService,StandardChangeLogHistoryService
public abstract class AbstractChangeLogHistoryService extends Object implements ChangeLogHistoryService
-
-
Field Summary
-
Fields inherited from interface liquibase.plugin.Plugin
PRIORITY_DATABASE, PRIORITY_DEFAULT, PRIORITY_NOT_APPLICABLE, PRIORITY_SPECIALIZED
-
-
Constructor Summary
Constructors Constructor Description AbstractChangeLogHistoryService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidgenerateDeploymentId()DatabasegetDatabase()StringgetDeploymentId()StringgetLastDeploymentId()Returns the deployment ID of the last changeset that has been run, ornullif no changesets have been run yet.RanChangeSetgetRanChangeSet(ChangeSet changeSet)DategetRanDate(ChangeSet changeSet)Returns the date the given changeSet was ran.ChangeSet.RunStatusgetRunStatus(ChangeSet changeSet)voidreplaceChecksum(ChangeSet changeSet)By default does nothing to keep compatibility with older versions, but subclasses may like to implement this method to support checksum upgrades.voidreset()voidresetDeploymentId()voidsetDatabase(Database database)voidupgradeChecksums(DatabaseChangeLog databaseChangeLog, Contexts contexts, LabelExpression labels)Updates null checksum values-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface liquibase.changelog.ChangeLogHistoryService
clearAllCheckSums, destroy, getNextSequenceValue, getPriority, getRanChangeSets, getRanChangeSets, init, isDatabaseChecksumsCompatible, removeFromHistory, setExecType, supports, tag, tagExists
-
-
-
-
Method Detail
-
getDatabase
public Database getDatabase()
-
setDatabase
public void setDatabase(Database database)
- Specified by:
setDatabasein interfaceChangeLogHistoryService
-
reset
public void reset()
- Specified by:
resetin interfaceChangeLogHistoryService
-
getRunStatus
public ChangeSet.RunStatus getRunStatus(ChangeSet changeSet) throws DatabaseException, DatabaseHistoryException
- Specified by:
getRunStatusin interfaceChangeLogHistoryService- Throws:
DatabaseExceptionDatabaseHistoryException
-
upgradeChecksums
public void upgradeChecksums(DatabaseChangeLog databaseChangeLog, Contexts contexts, LabelExpression labels) throws DatabaseException
Description copied from interface:ChangeLogHistoryServiceUpdates null checksum values- Specified by:
upgradeChecksumsin interfaceChangeLogHistoryService- Throws:
DatabaseException
-
getRanChangeSet
public RanChangeSet getRanChangeSet(ChangeSet changeSet) throws DatabaseException, DatabaseHistoryException
- Specified by:
getRanChangeSetin interfaceChangeLogHistoryService- Throws:
DatabaseExceptionDatabaseHistoryException
-
getRanDate
public Date getRanDate(ChangeSet changeSet) throws DatabaseException, DatabaseHistoryException
Description copied from interface:ChangeLogHistoryServiceReturns the date the given changeSet was ran. Returns null if changeSet was not null.- Specified by:
getRanDatein interfaceChangeLogHistoryService- Throws:
DatabaseExceptionDatabaseHistoryException
-
getLastDeploymentId
public String getLastDeploymentId() throws DatabaseException
Returns the deployment ID of the last changeset that has been run, ornullif no changesets have been run yet.- Returns:
- the deployment ID of the last changeset that has been run, or null if no changesets have been run yet.
- Throws:
DatabaseException- if there is an error accessing the database
-
replaceChecksum
public void replaceChecksum(ChangeSet changeSet) throws DatabaseException
Description copied from interface:ChangeLogHistoryServiceBy default does nothing to keep compatibility with older versions, but subclasses may like to implement this method to support checksum upgrades.- Specified by:
replaceChecksumin interfaceChangeLogHistoryService- Throws:
DatabaseException
-
getDeploymentId
public String getDeploymentId()
- Specified by:
getDeploymentIdin interfaceChangeLogHistoryService
-
resetDeploymentId
public void resetDeploymentId()
- Specified by:
resetDeploymentIdin interfaceChangeLogHistoryService
-
generateDeploymentId
public void generateDeploymentId()
- Specified by:
generateDeploymentIdin interfaceChangeLogHistoryService
-
-