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

java.lang.Object
  extended by com.googlecode.flyway.core.migration.Migration
      extended by com.googlecode.flyway.core.migration.java.BaseJavaMigration
All Implemented Interfaces:
JavaMigration, JavaMigrationChecksumProvider, JavaMigrationInfoProvider, java.lang.Comparable<Migration>

Deprecated. Implement JavaMigration directly instead. Also consider implementing JavaMigrationChecksumProvider and JavaMigrationInfoProvider if you need more control. This class will be removed in Flyway 1.5.

@Deprecated
public abstract class BaseJavaMigration
extends Migration
implements JavaMigration, JavaMigrationInfoProvider, JavaMigrationChecksumProvider

Base class for java migration classes whose name conforms to the Flyway standard. Example: V1_2__Change_values


Field Summary
 
Fields inherited from class com.googlecode.flyway.core.migration.Migration
checksum, description, schemaVersion, script
 
Constructor Summary
protected BaseJavaMigration()
          Deprecated. Initializes this Migration with this standard Flyway name.
protected BaseJavaMigration(java.lang.String version, java.lang.String description)
          Deprecated. Initializes this Migration with this version
 
Method Summary
protected abstract  void doMigrateInTransaction(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
          Deprecated. Performs the migration inside a transaction.
 MigrationType getMigrationType()
          Deprecated.  
 void migrate(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
          Deprecated. Executes this migration.
 void migrate(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, DbSupport dbSupport)
          Deprecated. 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
 
Methods inherited from interface com.googlecode.flyway.core.migration.java.JavaMigrationInfoProvider
getDescription, getVersion
 
Methods inherited from interface com.googlecode.flyway.core.migration.java.JavaMigrationChecksumProvider
getChecksum
 

Constructor Detail

BaseJavaMigration

protected BaseJavaMigration()
Deprecated. 
Initializes this Migration with this standard Flyway name.


BaseJavaMigration

protected BaseJavaMigration(java.lang.String version,
                            java.lang.String description)
Deprecated. 
Initializes this Migration with this version

Parameters:
version - The version string for this migration, e.g. 1.2.3
description - The description for this migration
Method Detail

getMigrationType

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

migrate

public final void migrate(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate,
                          DbSupport dbSupport)
                   throws java.lang.IllegalStateException
Deprecated. 
Performs the migration.

Specified by:
migrate in class Migration
Parameters:
jdbcTemplate - To execute the migration statements.
dbSupport - The support for database-specific extensions.
Throws:
java.lang.IllegalStateException - Thrown when the migration failed.

migrate

public void migrate(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
             throws java.lang.Exception
Deprecated. 
Description copied from interface: JavaMigration
Executes this migration. The execution will automatically take place within a transaction, when the underlying database supports it.

Specified by:
migrate in interface JavaMigration
Parameters:
jdbcTemplate - The jdbcTemplate to use to execute statements.
Throws:
java.lang.Exception - when the migration failed.

doMigrateInTransaction

protected abstract void doMigrateInTransaction(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
                                        throws java.lang.Exception
Deprecated. 
Performs the migration inside a transaction.

Parameters:
jdbcTemplate - To execute the migration statements.
Throws:
org.springframework.dao.DataAccessException - Thrown when the migration failed.
java.lang.Exception


Copyright © 2011. All Rights Reserved.