com.googlecode.flyway.core.migration.jdbc
Class JdbcMigrationExecutor

java.lang.Object
  extended by com.googlecode.flyway.core.migration.Migration
      extended by com.googlecode.flyway.core.migration.jdbc.JdbcMigrationExecutor
All Implemented Interfaces:
java.lang.Comparable<Migration>

public class JdbcMigrationExecutor
extends Migration

Adapter for executing migrations implementing JdbcMigration.


Field Summary
 
Fields inherited from class com.googlecode.flyway.core.migration.Migration
checksum, description, schemaVersion, script
 
Constructor Summary
JdbcMigrationExecutor(JdbcMigration jdbcMigration)
          Creates a new JdbcMigrationExecutor.
 
Method Summary
 java.lang.String getLocation()
          retrieves the location of the migration
 MigrationType getMigrationType()
           
 void migrate(JdbcTemplate jdbcTemplate, DbSupport dbSupport)
          Performs the migration.
 
Methods inherited from class com.googlecode.flyway.core.migration.Migration
compareTo, equals, getChecksum, getDescription, getScript, getVersion, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcMigrationExecutor

public JdbcMigrationExecutor(JdbcMigration jdbcMigration)
Creates a new JdbcMigrationExecutor.

Parameters:
jdbcMigration - The JdbcMigration to execute.
Method Detail

getLocation

public java.lang.String getLocation()
Description copied from class: Migration
retrieves the location of the migration

Specified by:
getLocation in class Migration
Returns:
source of this migration

getMigrationType

public MigrationType getMigrationType()
Specified by:
getMigrationType in class Migration
Returns:
The type of migration (INIT, SQL or JAVA)

migrate

public void migrate(JdbcTemplate jdbcTemplate,
                    DbSupport dbSupport)
Description copied from class: Migration
Performs the migration.

Specified by:
migrate in class Migration
Parameters:
jdbcTemplate - To execute the migration statements.
dbSupport - The support for database-specific extensions.


Copyright © 2012. All Rights Reserved.