Class FileMigrationLoader

java.lang.Object
org.apache.ibatis.migration.FileMigrationLoader
All Implemented Interfaces:
MigrationLoader

public class FileMigrationLoader extends Object implements MigrationLoader
  • Field Details

    • scriptsDir

      protected final File scriptsDir
    • charset

      protected final String charset
    • variables

      protected final Properties variables
  • Constructor Details

    • FileMigrationLoader

      public FileMigrationLoader(File scriptsDir, String charset, Properties variables)
  • Method Details

    • getMigrations

      public List<Change> getMigrations()
      Specified by:
      getMigrations in interface MigrationLoader
      Returns:
      A list of migrations (bootstrap should NOT be included).
    • isSpecialFile

      protected boolean isSpecialFile(String filename)
    • parseChangeFromFilename

      protected Change parseChangeFromFilename(String filename)
    • getScriptReader

      public Reader getScriptReader(Change change, boolean undo)
      Specified by:
      getScriptReader in interface MigrationLoader
      Parameters:
      change - identifies the migration to read.
      undo - whether the caller requests UNDO SQL script or not.
      Returns:
      A Reader of the specified SQL script.
    • getBootstrapReader

      public Reader getBootstrapReader()
      Specified by:
      getBootstrapReader in interface MigrationLoader
      Returns:
      A Reader of the bootstrap SQL script.
    • getOnAbortReader

      public Reader getOnAbortReader()
      Specified by:
      getOnAbortReader in interface MigrationLoader
      Returns:
      A Reader of the onabort SQL script.
    • getSoleScriptReader

      protected Reader getSoleScriptReader(String fileName)