it.openutils.migration.generic
Class JdbcIfTableExistsConditionalTask

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.JdbcIfTableExistsConditionalTask
All Implemented Interfaces:
DbTask

public class JdbcIfTableExistsConditionalTask
extends BaseConditionalTask

Task that executes if a given table exists.

Version:
$Id: JdbcIfTableExistsConditionalTask.java 1329 2009-09-02 14:55:16Z fgiust $
Author:
fgiust

Field Summary
protected  java.lang.String catalog
          Catalog.
protected  java.lang.String schema
          Schema.
protected  java.lang.String table
          Table name.
 
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
JdbcIfTableExistsConditionalTask()
           
 
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 setSchema(java.lang.String schema)
          Sets the schema.
 void setTable(java.lang.String table)
          Sets the table.
 
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
 

Field Detail

table

protected java.lang.String table
Table name.


catalog

protected java.lang.String catalog
Catalog.


schema

protected java.lang.String schema
Schema.

Constructor Detail

JdbcIfTableExistsConditionalTask

public JdbcIfTableExistsConditionalTask()
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

setTable

public void setTable(java.lang.String table)
Sets the table.

Parameters:
table - the table 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.