it.openutils.migration.task.setup
Class GenericScriptBasedConditionalTask

java.lang.Object
  extended by it.openutils.migration.task.setup.GenericScriptBasedConditionalTask
All Implemented Interfaces:
DbTask
Direct Known Subclasses:
SqlServerObjCreationTask, SqlServerViewCreateOrUpdateTask

public class GenericScriptBasedConditionalTask
extends java.lang.Object
implements DbTask

Version:
$Id: GenericScriptBasedConditionalTask.java 358 2007-07-12 09:29:18Z fgiust $
Author:
fgiust

Field Summary
protected  java.lang.String check
          Check statement.
protected  java.lang.String description
          Custom description.
protected  java.util.List<org.springframework.core.io.Resource> scripts
          Script list to execute
 
Constructor Summary
GenericScriptBasedConditionalTask()
           
 
Method Summary
 void execute(javax.sql.DataSource dataSource)
          Execute this db task.
 java.lang.String getDescription()
          Returns a description for this task
protected  java.lang.String objectNameFromFileName(org.springframework.core.io.Resource script)
           
 void setCheck(java.lang.String check)
          Sets the check.
 void setDescription(java.lang.String description)
          Sets the description.
 void setScripts(java.util.List<org.springframework.core.io.Resource> scripts)
          Sets the scripts.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scripts

protected java.util.List<org.springframework.core.io.Resource> scripts
Script list to execute


check

protected java.lang.String check
Check statement.


description

protected java.lang.String description
Custom description.

Constructor Detail

GenericScriptBasedConditionalTask

public GenericScriptBasedConditionalTask()
Method Detail

setScripts

public void setScripts(java.util.List<org.springframework.core.io.Resource> scripts)
Sets the scripts.

Parameters:
scripts - the scripts to set

setCheck

public void setCheck(java.lang.String check)
Sets the check.

Parameters:
check - the check to set

setDescription

public void setDescription(java.lang.String description)
Sets the description.

Parameters:
description - the description to set

objectNameFromFileName

protected java.lang.String objectNameFromFileName(org.springframework.core.io.Resource script)
Parameters:
script - The script resource
Returns:
The script name

getDescription

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

Specified by:
getDescription in interface DbTask
Returns:
task description

execute

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

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


Copyright © 2007 Openmind. All Rights Reserved.