Package liquibase.nosql.changelog
Class AbstractNoSqlHistoryService<D extends AbstractNoSqlDatabase>
- java.lang.Object
-
- liquibase.changelog.AbstractChangeLogHistoryService
-
- liquibase.nosql.changelog.AbstractNoSqlHistoryService<D>
-
- All Implemented Interfaces:
liquibase.changelog.ChangeLogHistoryService,liquibase.servicelocator.PrioritizedService
- Direct Known Subclasses:
MongoHistoryService
public abstract class AbstractNoSqlHistoryService<D extends AbstractNoSqlDatabase> extends liquibase.changelog.AbstractChangeLogHistoryService
-
-
Constructor Summary
Constructors Constructor Description AbstractNoSqlHistoryService()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidadjustRepository()booleancanCreateChangeLogTable()voidclearAllCheckSums()TODO: Raise with Liquibase why is this one not used instead ofUpdateStatementinLiquibase.clearCheckSums()protected abstract voidclearChekSums()protected abstract longcountRanChangeSets()protected abstract longcountTags(String tag)protected abstract voidcreateRepository()voiddestroy()protected abstract voiddropRepository()protected abstract BooleanexistsRepository()protected abstract IntegergenerateNextSequence()StringgetDatabaseChangeLogTableName()NoSqlExecutorgetExecutor()protected abstract liquibase.logging.LoggergetLogger()intgetNextSequenceValue()DgetNoSqlDatabase()intgetPriority()liquibase.changelog.RanChangeSetgetRanChangeSet(liquibase.changelog.ChangeSet changeSet)List<liquibase.changelog.RanChangeSet>getRanChangeSets()Returns the ChangeSets that have been run against the current getDatabase().booleanhasDatabaseChangeLogTable()voidinit()booleanisServiceInitialized()protected abstract voidmarkChangeSetRun(liquibase.changelog.ChangeSet changeSet, liquibase.changelog.ChangeSet.ExecType execType, Integer nextSequenceValue)protected abstract List<liquibase.changelog.RanChangeSet>queryRanChangeSets()voidremoveFromHistory(liquibase.changelog.ChangeSet changeSet)protected abstract voidremoveRanChangeSet(liquibase.changelog.ChangeSet changeSet)voidreplaceChecksum(liquibase.changelog.ChangeSet changeSet)voidreset()voidsetExecType(liquibase.changelog.ChangeSet changeSet, liquibase.changelog.ChangeSet.ExecType execType)voidtag(String tagString)Tags the database changelog with the given string.booleantagExists(String tag)protected abstract voidtagLast(String tagString)protected abstract voidupdateCheckSum(liquibase.changelog.ChangeSet changeSet)-
Methods inherited from class liquibase.changelog.AbstractChangeLogHistoryService
generateDeploymentId, getDatabase, getDeploymentId, getLastDeploymentId, getRanDate, getRunStatus, resetDeploymentId, setDatabase, upgradeChecksums
-
-
-
-
Method Detail
-
getPriority
public int getPriority()
-
getDatabaseChangeLogTableName
public String getDatabaseChangeLogTableName()
-
canCreateChangeLogTable
public boolean canCreateChangeLogTable()
-
isServiceInitialized
public boolean isServiceInitialized()
-
getNoSqlDatabase
public D getNoSqlDatabase()
-
getExecutor
public NoSqlExecutor getExecutor()
-
reset
public void reset()
- Specified by:
resetin interfaceliquibase.changelog.ChangeLogHistoryService- Overrides:
resetin classliquibase.changelog.AbstractChangeLogHistoryService
-
init
public void init() throws liquibase.exception.DatabaseException- Throws:
liquibase.exception.DatabaseException
-
hasDatabaseChangeLogTable
public boolean hasDatabaseChangeLogTable()
-
getRanChangeSets
public List<liquibase.changelog.RanChangeSet> getRanChangeSets() throws liquibase.exception.DatabaseException
Returns the ChangeSets that have been run against the current getDatabase().- Throws:
liquibase.exception.DatabaseException
-
replaceChecksum
public void replaceChecksum(liquibase.changelog.ChangeSet changeSet) throws liquibase.exception.DatabaseException- Specified by:
replaceChecksumin classliquibase.changelog.AbstractChangeLogHistoryService- Throws:
liquibase.exception.DatabaseException
-
getRanChangeSet
public liquibase.changelog.RanChangeSet getRanChangeSet(liquibase.changelog.ChangeSet changeSet) throws liquibase.exception.DatabaseException, liquibase.exception.DatabaseHistoryException- Specified by:
getRanChangeSetin interfaceliquibase.changelog.ChangeLogHistoryService- Overrides:
getRanChangeSetin classliquibase.changelog.AbstractChangeLogHistoryService- Throws:
liquibase.exception.DatabaseExceptionliquibase.exception.DatabaseHistoryException
-
setExecType
public void setExecType(liquibase.changelog.ChangeSet changeSet, liquibase.changelog.ChangeSet.ExecType execType) throws liquibase.exception.DatabaseException- Throws:
liquibase.exception.DatabaseException
-
removeFromHistory
public void removeFromHistory(liquibase.changelog.ChangeSet changeSet) throws liquibase.exception.DatabaseException- Throws:
liquibase.exception.DatabaseException
-
getNextSequenceValue
public int getNextSequenceValue() throws liquibase.exception.DatabaseException- Throws:
liquibase.exception.DatabaseException
-
tag
public void tag(String tagString) throws liquibase.exception.DatabaseException
Tags the database changelog with the given string.- Throws:
liquibase.exception.DatabaseException
-
tagExists
public boolean tagExists(String tag) throws liquibase.exception.DatabaseException
- Throws:
liquibase.exception.DatabaseException
-
clearAllCheckSums
public void clearAllCheckSums() throws liquibase.exception.DatabaseExceptionTODO: Raise with Liquibase why is this one not used instead ofUpdateStatementinLiquibase.clearCheckSums()- Throws:
liquibase.exception.DatabaseException- in case of a failure
-
destroy
public void destroy()
-
getLogger
protected abstract liquibase.logging.Logger getLogger()
-
existsRepository
protected abstract Boolean existsRepository() throws liquibase.exception.DatabaseException
- Throws:
liquibase.exception.DatabaseException
-
createRepository
protected abstract void createRepository() throws liquibase.exception.DatabaseException- Throws:
liquibase.exception.DatabaseException
-
adjustRepository
protected abstract void adjustRepository() throws liquibase.exception.DatabaseException- Throws:
liquibase.exception.DatabaseException
-
dropRepository
protected abstract void dropRepository() throws liquibase.exception.DatabaseException- Throws:
liquibase.exception.DatabaseException
-
queryRanChangeSets
protected abstract List<liquibase.changelog.RanChangeSet> queryRanChangeSets() throws liquibase.exception.DatabaseException
- Throws:
liquibase.exception.DatabaseException
-
generateNextSequence
protected abstract Integer generateNextSequence() throws liquibase.exception.DatabaseException
- Throws:
liquibase.exception.DatabaseException
-
markChangeSetRun
protected abstract void markChangeSetRun(liquibase.changelog.ChangeSet changeSet, liquibase.changelog.ChangeSet.ExecType execType, Integer nextSequenceValue) throws liquibase.exception.DatabaseException- Throws:
liquibase.exception.DatabaseException
-
removeRanChangeSet
protected abstract void removeRanChangeSet(liquibase.changelog.ChangeSet changeSet) throws liquibase.exception.DatabaseException- Throws:
liquibase.exception.DatabaseException
-
clearChekSums
protected abstract void clearChekSums() throws liquibase.exception.DatabaseException- Throws:
liquibase.exception.DatabaseException
-
countTags
protected abstract long countTags(String tag) throws liquibase.exception.DatabaseException
- Throws:
liquibase.exception.DatabaseException
-
tagLast
protected abstract void tagLast(String tagString) throws liquibase.exception.DatabaseException
- Throws:
liquibase.exception.DatabaseException
-
countRanChangeSets
protected abstract long countRanChangeSets() throws liquibase.exception.DatabaseException- Throws:
liquibase.exception.DatabaseException
-
updateCheckSum
protected abstract void updateCheckSum(liquibase.changelog.ChangeSet changeSet) throws liquibase.exception.DatabaseException- Throws:
liquibase.exception.DatabaseException
-
-