it.openutils.migration.generic
Class JdbcIfForeignKeyExistsConditionalTask

java.lang.Object
  extended by it.openutils.migration.task.setup.BaseDbTask
      extended by it.openutils.migration.task.setup.BaseConditionalTask
          extended by it.openutils.migration.generic.JdbcIfForeignKeyExistsConditionalTask
All Implemented Interfaces:
DbTask

public class JdbcIfForeignKeyExistsConditionalTask
extends BaseConditionalTask

Task that executes if a named foreign key eists.

Version:
$Id: JdbcIfForeignKeyExistsConditionalTask.java 834 2008-06-11 21:18:57Z fgiust $
Author:
fgiust

Field Summary
 
Fields inherited from class it.openutils.migration.task.setup.BaseConditionalTask
ddl, log, not, scripts, variables
 
Fields inherited from class it.openutils.migration.task.setup.BaseDbTask
description
 
Constructor Summary
JdbcIfForeignKeyExistsConditionalTask()
           
 
Method Summary
 boolean check(org.springframework.jdbc.core.simple.SimpleJdbcTemplate jdbcTemplate)
          Subclasses need to override this method and provide specific checks.
 void setCatalog(java.lang.String catalog)
          Sets the catalog.
 void setFkName(java.lang.String fkName)
          Sets the fkName (TABLE.FKNAME).
 void setSchema(java.lang.String schema)
          Sets the schema.
 
Methods inherited from class it.openutils.migration.task.setup.BaseConditionalTask
execute, executeSingle, getDescription, objectNameFromFileName, performSubstitution, setDdl, setDdlScript, setNot, setScripts
 
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

JdbcIfForeignKeyExistsConditionalTask

public JdbcIfForeignKeyExistsConditionalTask()
Method Detail

setCatalog

public void setCatalog(java.lang.String catalog)
Sets the catalog.

Parameters:
catalog - the catalog to set

setSchema

public void setSchema(java.lang.String schema)
Sets the schema.

Parameters:
schema - the schema to set

setFkName

public void setFkName(java.lang.String fkName)
Sets the fkName (TABLE.FKNAME).

Parameters:
fkName - the fkName to set

check

public boolean check(org.springframework.jdbc.core.simple.SimpleJdbcTemplate jdbcTemplate)
Subclasses need to override this method and provide specific checks.

Specified by:
check in class BaseConditionalTask
Parameters:
jdbcTemplate - SimpleJdbcTemplate
Returns:
true if the condition is met


Copyright © 2009 Openmind. All Rights Reserved.