Class LiquibaseDAOImpl

java.lang.Object
com.softslate.commerce.daos.core.BaseDAO
com.softslate.commerce.daos.core.LiquibaseDAOImpl
All Implemented Interfaces:
DAOInterface, LiquibaseDAO

public class LiquibaseDAOImpl extends BaseDAO implements LiquibaseDAO
  • Field Details

  • Constructor Details

    • LiquibaseDAOImpl

      public LiquibaseDAOImpl()
  • Method Details

    • getChangeLogFile

      public String getChangeLogFile()
    • setChangeLogFile

      public void setChangeLogFile(String changeLogFile)
    • getContexts

      public String getContexts()
    • setContexts

      public void setContexts(String ctxt)
    • getLabels

      public String getLabels()
    • setLabels

      public void setLabels(String labels)
    • getDefaultSchema

      public String getDefaultSchema()
    • initializeLiquibaseAndRunUpdates

      public void initializeLiquibaseAndRunUpdates(javax.servlet.ServletContext servletContext)
      Specified by:
      initializeLiquibaseAndRunUpdates in interface LiquibaseDAO
    • checkPreconditions

      private boolean checkPreconditions(javax.servlet.ServletContext servletContext, InitialContext ic)
      Checks if the update is supposed to be executed. That depends on several conditions:
      1. if liquibase.shouldRun is false the update will not be executed.
      2. if "liquibase.host.includes" contains the current hostname, the the update will be executed.
      3. if "liquibase.host.excludes" contains the current hostname, the the update will not be executed.
    • executeUpdate

      private void executeUpdate(javax.servlet.ServletContext servletContext, InitialContext ic) throws NamingException, SQLException, liquibase.exception.LiquibaseException
      Executes the Liquibase update.
      Throws:
      NamingException
      SQLException
      liquibase.exception.LiquibaseException