Package liquibase.executor
Class AbstractExecutor
- java.lang.Object
-
- liquibase.executor.AbstractExecutor
-
- Direct Known Subclasses:
JdbcExecutor,LoggingExecutor
public abstract class AbstractExecutor extends Object implements Executor
Code common to all Executor services / blueprint for Executor service classes.
-
-
Field Summary
Fields Modifier and Type Field Description protected Databasedatabaseprotected ResourceAccessorresourceAccessor-
Fields inherited from interface liquibase.plugin.Plugin
PRIORITY_DATABASE, PRIORITY_DEFAULT, PRIORITY_NOT_APPLICABLE, PRIORITY_SPECIALIZED
-
-
Constructor Summary
Constructors Constructor Description AbstractExecutor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected String[]applyVisitors(SqlStatement statement, List<SqlVisitor> sqlVisitors)voidexecute(Change change)Write methodsvoidexecute(Change change, List<SqlVisitor> sqlVisitors)abstract StringgetName()Return the name of the Executorabstract intgetPriority()Return 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.ValidationErrorsvalidate(ChangeSet changeSet)Validate if the changeset can be executed by this Executor-
Methods 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 Detail
-
database
protected Database database
-
resourceAccessor
protected ResourceAccessor resourceAccessor
-
-
Method Detail
-
getName
public abstract String 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
public ValidationErrors validate(ChangeSet changeSet)
Validate if the changeset can be executed by this Executor
-
modifyChangeSet
public void modifyChangeSet(ChangeSet changeSet)
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
public void setResourceAccessor(ResourceAccessor resourceAccessor)
Sets aResourceAccessorobject on this Executor to be used for file access.- Specified by:
setResourceAccessorin interfaceExecutor- Parameters:
resourceAccessor- theResourceAccessorobject to set
-
setDatabase
public void setDatabase(Database database)
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
public void execute(Change change) throws DatabaseException
Description copied from interface:ExecutorWrite methods- Specified by:
executein interfaceExecutor- Throws:
DatabaseException
-
execute
public void execute(Change change, List<SqlVisitor> sqlVisitors) throws DatabaseException
- Specified by:
executein interfaceExecutor- Throws:
DatabaseException
-
-