org.dbmaintain.launch.ant
Class MarkDatabaseAsUpToDateAntTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.dbmaintain.launch.ant.BaseAntTask
              extended by org.dbmaintain.launch.ant.BaseDatabaseAntTask
                  extended by org.dbmaintain.launch.ant.MarkDatabaseAsUpToDateAntTask

public class MarkDatabaseAsUpToDateAntTask
extends BaseDatabaseAntTask

This operation updates the state of the database to indicate that all scripts have been executed, without actually executing them. This can be useful when you want to start using DbMaintain on an existing database, or after having fixed a problem directly on the database.

Author:
Filip Neven, Tim Ducheyne

Field Summary
 
Fields inherited from class org.dbmaintain.launch.ant.BaseDatabaseAntTask
databases
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
MarkDatabaseAsUpToDateAntTask()
           
 
Method Summary
protected  DbMaintainTask createDbMaintainTask()
           
 void setAutoCreateDbMaintainScriptsTable(Boolean autoCreateDbMaintainScriptsTable)
          Sets the autoCreateDbMaintainScriptsTable property.
 void setExcludedQualifiers(String excludedQualifiers)
          Optional comma-separated list of script qualifiers.
 void setIncludedQualifiers(String includedQualifiers)
          Optional comma-separated list of script qualifiers.
 void setQualifiers(String qualifiers)
          Optional comma-separated list of script qualifiers.
 void setScriptFileExtensions(String scriptFileExtensions)
          Sets the scriptFileExtensions property, that defines the extensions of the files that are regarded to be database scripts.
 void setScriptLocations(String scriptLocations)
          Defines where the scripts can be found that must be executed on the database.
 
Methods inherited from class org.dbmaintain.launch.ant.BaseDatabaseAntTask
addDatabase, getDbMaintainDatabases
 
Methods inherited from class org.dbmaintain.launch.ant.BaseAntTask
execute, getAntProperties, getCustomConfigFile, setConfigFile
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarkDatabaseAsUpToDateAntTask

public MarkDatabaseAsUpToDateAntTask()
Method Detail

createDbMaintainTask

protected DbMaintainTask createDbMaintainTask()
Specified by:
createDbMaintainTask in class BaseAntTask

setScriptLocations

public void setScriptLocations(String scriptLocations)
Defines where the scripts can be found that must be executed on the database. Multiple locations may be configured, separated by comma's. A script location can be a folder or a jar file. This property is required.

Parameters:
scriptLocations - Comma separated list of script locations

setAutoCreateDbMaintainScriptsTable

public void setAutoCreateDbMaintainScriptsTable(Boolean autoCreateDbMaintainScriptsTable)
Sets the autoCreateDbMaintainScriptsTable property. If set to true, the table DBMAINTAIN_SCRIPTS will be created automatically if it does not exist yet. If false, an exception is thrown, indicating how to create the table manually. False by default.

Parameters:
autoCreateDbMaintainScriptsTable - True if the DBMAINTAIN_SCRIPTS table can be created automatically

setQualifiers

public void setQualifiers(String qualifiers)
Optional comma-separated list of script qualifiers. All custom qualifiers that are used in script file names must be declared.

Parameters:
qualifiers - the registered (allowed) script qualifiers

setIncludedQualifiers

public void setIncludedQualifiers(String includedQualifiers)
Optional comma-separated list of script qualifiers. All included qualifiers must be registered using the qualifiers property. Only scripts which are qualified with one of the included qualifiers will be executed.

Parameters:
includedQualifiers - the included script qualifiers

setExcludedQualifiers

public void setExcludedQualifiers(String excludedQualifiers)
Optional comma-separated list of script qualifiers. All excluded qualifiers must be registered using the qualifiers property. Scripts qualified with one of the excluded qualifiers will not be executed.

Parameters:
excludedQualifiers - the excluded script qualifiers

setScriptFileExtensions

public void setScriptFileExtensions(String scriptFileExtensions)
Sets the scriptFileExtensions property, that defines the extensions of the files that are regarded to be database scripts. The extensions should not start with a dot. The default is 'sql,ddl'.

Parameters:
scriptFileExtensions - Comma separated list of file extensions.


Copyright © 2011. All Rights Reserved.