Package org.apache.ibatis.migration
Class JavaMigrationLoader
- java.lang.Object
-
- org.apache.ibatis.migration.JavaMigrationLoader
-
- All Implemented Interfaces:
MigrationLoader
public class JavaMigrationLoader extends java.lang.Object implements MigrationLoader
-
-
Constructor Summary
Constructors Constructor Description JavaMigrationLoader(java.lang.ClassLoader classLoader, java.lang.String... packageNames)JavaMigrationLoader(java.lang.String... packageNames)
-
Method Summary
Modifier and Type Method Description java.io.ReadergetBootstrapReader()java.util.List<Change>getMigrations()java.io.ReadergetOnAbortReader()java.io.ReadergetScriptReader(Change change, boolean undo)<T extends SimpleScript>
java.io.ReadergetSoleScriptReader(java.lang.Class<T> scriptClass)
-
-
-
Method Detail
-
getMigrations
public java.util.List<Change> getMigrations()
- Specified by:
getMigrationsin interfaceMigrationLoader- Returns:
- A list of migrations (bootstrap should NOT be included).
-
getScriptReader
public java.io.Reader getScriptReader(Change change, boolean undo)
- Specified by:
getScriptReaderin interfaceMigrationLoader- Parameters:
change- identifies the migration to read.undo- whether the caller requests UNDO SQL script or not.- Returns:
- A
Readerof the specified SQL script.
-
getBootstrapReader
public java.io.Reader getBootstrapReader()
- Specified by:
getBootstrapReaderin interfaceMigrationLoader- Returns:
- A
Readerof the bootstrap SQL script.
-
getOnAbortReader
public java.io.Reader getOnAbortReader()
- Specified by:
getOnAbortReaderin interfaceMigrationLoader- Returns:
- A
Readerof the onabort SQL script.
-
getSoleScriptReader
public <T extends SimpleScript> java.io.Reader getSoleScriptReader(java.lang.Class<T> scriptClass)
-
-