com.googlecode.flyway.core.migration.java
Class JavaMigrationExecutor

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

public class JavaMigrationExecutor
extends Migration

Adapter for executing migrations implementing JavaMigration.


Field Summary
 
Fields inherited from class com.googlecode.flyway.core.migration.Migration
checksum, description, schemaVersion, script
 
Constructor Summary
JavaMigrationExecutor(JavaMigration javaMigration)
          Creates a new JavaMigrationExecutor.
 
Method Summary
 java.lang.String getLocation()
          retrieves the location of the migration
 MigrationType getMigrationType()
           
 void migrate(org.springframework.jdbc.core.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

JavaMigrationExecutor

public JavaMigrationExecutor(JavaMigration javaMigration)
Creates a new JavaMigrationExecutor.

Parameters:
javaMigration - The JavaMigration 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(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate,
                    DbSupport dbSupport)
             throws org.springframework.dao.DataAccessException
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.
Throws:
org.springframework.dao.DataAccessException - Thrown when the migration failed.


Copyright © 2011. All Rights Reserved.