it.openutils.migration.sqlserver
Class SqlServerGenericAlterTask

java.lang.Object
  extended by it.openutils.migration.task.setup.BaseDbTask
      extended by it.openutils.migration.task.setup.GenericConditionalTask
          extended by it.openutils.migration.sqlserver.SqlServerGenericAlterTask
All Implemented Interfaces:
DbTask

public class SqlServerGenericAlterTask
extends GenericConditionalTask

This class is used for any alter task needed. The triggerValue is the value (only numeric) of result query that activates the alter script. Default is zero. Both the condition query and the alter query can be script or embedded in the xml.

Version:
$Id:SqlServerGenericAlterTask.java 3143 2007-09-24 19:50:49Z fgiust $
Author:
Danilo Ghirardelli

Constructor Summary
SqlServerGenericAlterTask()
           
 
Method Summary
 void execute(javax.sql.DataSource dataSource)
          Execute this db task.
 java.lang.String getDescription()
          Returns a description for this task
 void setCheckScript(org.springframework.core.io.Resource checkScript)
          Sets the checkScript.
 void setDdl(java.lang.String ddl)
          Sets the ddl.
 void setDdlScript(org.springframework.core.io.Resource ddlScript)
          Sets the ddlScript.
 void setSourceDb(java.lang.String sourceDb)
          Sets the sourceDb.
 void setTriggerValue(java.lang.Integer triggerValue)
          Sets the triggerValue.
 
Methods inherited from class it.openutils.migration.task.setup.GenericConditionalTask
getCheck, setCheck
 
Methods inherited from class it.openutils.migration.task.setup.BaseDbTask
setDescription
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqlServerGenericAlterTask

public SqlServerGenericAlterTask()
Method Detail

setCheckScript

public void setCheckScript(org.springframework.core.io.Resource checkScript)
Sets the checkScript.

Parameters:
checkScript - the checkScript to set

setDdl

public void setDdl(java.lang.String ddl)
Sets the ddl.

Overrides:
setDdl in class GenericConditionalTask
Parameters:
ddl - the ddl to set

setDdlScript

public void setDdlScript(org.springframework.core.io.Resource ddlScript)
Sets the ddlScript.

Parameters:
ddlScript - the ddlScript to set

setTriggerValue

public void setTriggerValue(java.lang.Integer triggerValue)
Sets the triggerValue.

Parameters:
triggerValue - the triggerValue to set

setSourceDb

public void setSourceDb(java.lang.String sourceDb)
Sets the sourceDb.

Parameters:
sourceDb - the sourceDb to set

getDescription

public java.lang.String getDescription()
Returns a description for this task

Specified by:
getDescription in interface DbTask
Overrides:
getDescription in class BaseDbTask
Returns:
task description

execute

public void execute(javax.sql.DataSource dataSource)
Execute this db task.

Specified by:
execute in interface DbTask
Overrides:
execute in class GenericConditionalTask
Parameters:
dataSource - javax.sql.datasource


Copyright © 2007 Openmind. All Rights Reserved.