Package liquibase.executor
Class AbstractExecutor
java.lang.Object
liquibase.executor.AbstractExecutor
- Direct Known Subclasses:
JdbcExecutor
,LoggingExecutor
Code common to all Executor services / blueprint for Executor service classes.
-
Field Summary
Fields inherited from interface liquibase.plugin.Plugin
PRIORITY_DATABASE, PRIORITY_DEFAULT, PRIORITY_NOT_APPLICABLE, PRIORITY_SPECIALIZED
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String[]
applyVisitors
(SqlStatement statement, List<SqlVisitor> sqlVisitors) void
Write methodsvoid
execute
(Change change, List<SqlVisitor> sqlVisitors) abstract String
getName()
Return the name of the Executorabstract int
Return the Executor priorityvoid
modifyChangeSet
(ChangeSet changeSet) Allow this Executor to make any needed changes to the changeset.void
setDatabase
(Database database) Configures the Executor for the Database to run statements/queries against.void
setResourceAccessor
(ResourceAccessor resourceAccessor) Sets aResourceAccessor
object on this Executor to be used for file access.Validate if the changeset can be executed by this ExecutorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface liquibase.executor.Executor
comment, execute, execute, queryForInt, queryForInt, queryForList, queryForList, queryForList, queryForList, queryForLong, queryForLong, queryForObject, queryForObject, supports, update, update, updatesDatabase
-
Field Details
-
database
-
resourceAccessor
-
-
Constructor Details
-
AbstractExecutor
public AbstractExecutor()
-
-
Method Details
-
getName
Return the name of the Executor -
getPriority
public abstract int getPriority()Return the Executor priority- Specified by:
getPriority
in interfaceExecutor
- Returns:
- int The Executor priority
-
validate
Validate if the changeset can be executed by this Executor -
modifyChangeSet
Allow this Executor to make any needed changes to the changeset. The base class sets splitStatements to 'true' if it is not set- Specified by:
modifyChangeSet
in interfaceExecutor
- Parameters:
changeSet
- The changeset to operate on
-
setResourceAccessor
Sets aResourceAccessor
object on this Executor to be used for file access.- Specified by:
setResourceAccessor
in interfaceExecutor
- Parameters:
resourceAccessor
- theResourceAccessor
object to set
-
setDatabase
Description copied from interface:Executor
Configures the Executor for the Database to run statements/queries against.- Specified by:
setDatabase
in interfaceExecutor
- Parameters:
database
- The database
-
applyVisitors
protected String[] applyVisitors(SqlStatement statement, List<SqlVisitor> sqlVisitors) throws DatabaseException - Throws:
DatabaseException
-
execute
Description copied from interface:Executor
Write methods- Specified by:
execute
in interfaceExecutor
- Throws:
DatabaseException
-
execute
- Specified by:
execute
in interfaceExecutor
- Throws:
DatabaseException
-