Package com.softslate.commerce.daos.core
Class LiquibaseDAOImpl
java.lang.Object
com.softslate.commerce.daos.core.BaseDAO
com.softslate.commerce.daos.core.LiquibaseDAOImpl
- All Implemented Interfaces:
DAOInterface,LiquibaseDAO
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate Stringprivate Stringprivate Stringprivate static final Stringprivate Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final String(package private) static org.apache.commons.logging.Log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate booleancheckPreconditions(javax.servlet.ServletContext servletContext, InitialContext ic) Checks if the update is supposed to be executed.private voidexecuteUpdate(javax.servlet.ServletContext servletContext, InitialContext ic) Executes the Liquibase update.voidinitializeLiquibaseAndRunUpdates(javax.servlet.ServletContext servletContext) voidsetChangeLogFile(String changeLogFile) voidsetContexts(String ctxt) voidMethods inherited from class com.softslate.commerce.daos.core.BaseDAO
deleteObject, doWorkToSetConnection, editAssignment, evictCache, formatDateTime, getAppComponents, getAppSettings, getConnection, getDaoFactory, getDAOUtils, getDataSource, getImportExportSQL, getImportExportSqlMap, getInjector, getNamedQuery, getSettings, getSQL, getSqlMap, initialize, insertObject, loadAll, loadAll, loadObject, parseDateTime, setAppComponents, setAppSettings, setConnection, setDaoFactory, setDAOUtils, setDataSource, setImportExportSqlMap, setInjector, setSettings, setSqlMap, updateObject
-
Field Details
-
log
static org.apache.commons.logging.Log log -
JAVA_COMP_ENV
- See Also:
-
LIQUIBASE_CHANGELOG
- See Also:
-
LIQUIBASE_CONTEXTS
- See Also:
-
LIQUIBASE_LABELS
- See Also:
-
LIQUIBASE_HOST_EXCLUDES
- See Also:
-
LIQUIBASE_HOST_INCLUDES
- See Also:
-
LIQUIBASE_ONERROR_FAIL
- See Also:
-
LIQUIBASE_PARAMETER
- See Also:
-
LIQUIBASE_SCHEMA_DEFAULT
- See Also:
-
changeLogFile
-
contexts
-
labels
-
defaultSchema
-
hostName
-
servletValueContainer
-
-
Constructor Details
-
LiquibaseDAOImpl
public LiquibaseDAOImpl()
-
-
Method Details
-
getChangeLogFile
-
setChangeLogFile
-
getContexts
-
setContexts
-
getLabels
-
setLabels
-
getDefaultSchema
-
initializeLiquibaseAndRunUpdates
public void initializeLiquibaseAndRunUpdates(javax.servlet.ServletContext servletContext) - Specified by:
initializeLiquibaseAndRunUpdatesin interfaceLiquibaseDAO
-
checkPreconditions
Checks if the update is supposed to be executed. That depends on several conditions:- if liquibase.shouldRun is
falsethe update will not be executed. - if "liquibase.host.includes" contains the current hostname, the the update will be executed.
- if "liquibase.host.excludes" contains the current hostname, the the update will not be executed.
- if liquibase.shouldRun is
-
executeUpdate
private void executeUpdate(javax.servlet.ServletContext servletContext, InitialContext ic) throws NamingException, SQLException, liquibase.exception.LiquibaseException Executes the Liquibase update.- Throws:
NamingExceptionSQLExceptionliquibase.exception.LiquibaseException
-