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
FieldsFields inherited from interface liquibase.plugin.Plugin
PRIORITY_DATABASE, PRIORITY_DEFAULT, PRIORITY_NOT_APPLICABLE, PRIORITY_SPECIALIZED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String[]applyVisitors(SqlStatement statement, List<SqlVisitor> sqlVisitors) voidWrite methodsvoidexecute(Change change, List<SqlVisitor> sqlVisitors) abstract StringgetName()Return the name of the Executorabstract intReturn the Executor priorityvoidmodifyChangeSet(ChangeSet changeSet) Allow this Executor to make any needed changes to the changeset.voidsetDatabase(Database database) Configures the Executor for the Database to run statements/queries against.voidsetResourceAccessor(ResourceAccessor resourceAccessor) Sets aResourceAccessorobject 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, waitMethods 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:
getPriorityin 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:
modifyChangeSetin interfaceExecutor- Parameters:
changeSet- The changeset to operate on
-
setResourceAccessor
Sets aResourceAccessorobject on this Executor to be used for file access.- Specified by:
setResourceAccessorin interfaceExecutor- Parameters:
resourceAccessor- theResourceAccessorobject to set
-
setDatabase
Description copied from interface:ExecutorConfigures the Executor for the Database to run statements/queries against.- Specified by:
setDatabasein interfaceExecutor- Parameters:
database- The database
-
applyVisitors
protected String[] applyVisitors(SqlStatement statement, List<SqlVisitor> sqlVisitors) throws DatabaseException - Throws:
DatabaseException
-
execute
Description copied from interface:ExecutorWrite methods- Specified by:
executein interfaceExecutor- Throws:
DatabaseException
-
execute
- Specified by:
executein interfaceExecutor- Throws:
DatabaseException
-