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 void
generateDeploymentId()
Database
getDatabase()
String
getDeploymentId()
String
getLastDeploymentId()
Returns the deployment ID of the last changeset that has been run, ornull
if no changesets have been run yet.RanChangeSet
getRanChangeSet(ChangeSet changeSet)
Date
getRanDate(ChangeSet changeSet)
Returns the date the given changeSet was ran.ChangeSet.RunStatus
getRunStatus(ChangeSet changeSet)
void
replaceChecksum(ChangeSet changeSet)
By default does nothing to keep compatibility with older versions, but subclasses may like to implement this method to support checksum upgrades.void
reset()
void
resetDeploymentId()
void
setDatabase(Database database)
void
upgradeChecksums(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:
setDatabase
in interfaceChangeLogHistoryService
-
reset
public void reset()
- Specified by:
reset
in interfaceChangeLogHistoryService
-
getRunStatus
public ChangeSet.RunStatus getRunStatus(ChangeSet changeSet) throws DatabaseException, DatabaseHistoryException
- Specified by:
getRunStatus
in interfaceChangeLogHistoryService
- Throws:
DatabaseException
DatabaseHistoryException
-
upgradeChecksums
public void upgradeChecksums(DatabaseChangeLog databaseChangeLog, Contexts contexts, LabelExpression labels) throws DatabaseException
Description copied from interface:ChangeLogHistoryService
Updates null checksum values- Specified by:
upgradeChecksums
in interfaceChangeLogHistoryService
- Throws:
DatabaseException
-
getRanChangeSet
public RanChangeSet getRanChangeSet(ChangeSet changeSet) throws DatabaseException, DatabaseHistoryException
- Specified by:
getRanChangeSet
in interfaceChangeLogHistoryService
- Throws:
DatabaseException
DatabaseHistoryException
-
getRanDate
public Date getRanDate(ChangeSet changeSet) throws DatabaseException, DatabaseHistoryException
Description copied from interface:ChangeLogHistoryService
Returns the date the given changeSet was ran. Returns null if changeSet was not null.- Specified by:
getRanDate
in interfaceChangeLogHistoryService
- Throws:
DatabaseException
DatabaseHistoryException
-
getLastDeploymentId
public String getLastDeploymentId() throws DatabaseException
Returns the deployment ID of the last changeset that has been run, ornull
if 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:ChangeLogHistoryService
By default does nothing to keep compatibility with older versions, but subclasses may like to implement this method to support checksum upgrades.- Specified by:
replaceChecksum
in interfaceChangeLogHistoryService
- Throws:
DatabaseException
-
getDeploymentId
public String getDeploymentId()
- Specified by:
getDeploymentId
in interfaceChangeLogHistoryService
-
resetDeploymentId
public void resetDeploymentId()
- Specified by:
resetDeploymentId
in interfaceChangeLogHistoryService
-
generateDeploymentId
public void generateDeploymentId()
- Specified by:
generateDeploymentId
in interfaceChangeLogHistoryService
-
-