Class AbstractNoSqlHistoryService<D extends AbstractNoSqlDatabase>

  • All Implemented Interfaces:
    liquibase.changelog.ChangeLogHistoryService, liquibase.servicelocator.PrioritizedService
    Direct Known Subclasses:
    CosmosHistoryService

    public abstract class AbstractNoSqlHistoryService<D extends AbstractNoSqlDatabase>
    extends liquibase.changelog.AbstractChangeLogHistoryService
    • Constructor Detail

      • AbstractNoSqlHistoryService

        public AbstractNoSqlHistoryService()
    • Method Detail

      • getPriority

        public int getPriority()
      • getDatabaseChangeLogTableName

        public String getDatabaseChangeLogTableName()
      • canCreateChangeLogTable

        public boolean canCreateChangeLogTable()
      • isServiceInitialized

        public boolean isServiceInitialized()
      • getNoSqlDatabase

        public D getNoSqlDatabase()
      • reset

        public void reset()
        Specified by:
        reset in interface liquibase.changelog.ChangeLogHistoryService
        Overrides:
        reset in class liquibase.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:
        replaceChecksum in class liquibase.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:
        getRanChangeSet in interface liquibase.changelog.ChangeLogHistoryService
        Overrides:
        getRanChangeSet in class liquibase.changelog.AbstractChangeLogHistoryService
        Throws:
        liquibase.exception.DatabaseException
        liquibase.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.DatabaseException
        TODO: Raise with Liquibase why is this one not used instead of UpdateStatement in Liquibase.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
      • clearCheckSums

        protected abstract void clearCheckSums()
                                        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