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
-
Field Summary
Modifier and TypeFieldDescriptionprivate String
private String
private String
private String
private static final String
private String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
(package private) static org.apache.commons.logging.Log
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
checkPreconditions
(javax.servlet.ServletContext servletContext, InitialContext ic) Checks if the update is supposed to be executed.private void
executeUpdate
(javax.servlet.ServletContext servletContext, InitialContext ic) Executes the Liquibase update.void
initializeLiquibaseAndRunUpdates
(javax.servlet.ServletContext servletContext) void
setChangeLogFile
(String changeLogFile) void
setContexts
(String ctxt) void
Methods 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:
initializeLiquibaseAndRunUpdates
in interfaceLiquibaseDAO
-
checkPreconditions
Checks if the update is supposed to be executed. That depends on several conditions:- if liquibase.shouldRun is
false
the 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:
NamingException
SQLException
liquibase.exception.LiquibaseException
-