Class MigrationManager


  • public class MigrationManager
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> void addBinding​(java.lang.Class<T> class_, T object)  
      boolean migrate​(step.core.collections.CollectionFactory collectionFactory, Version from, Version to)
      Runs all the migration tasks registered to migrate
      void register​(java.lang.Class<? extends MigrationTask> migrationTask)
      Register a new migration task
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MigrationManager

        public MigrationManager()
    • Method Detail

      • addBinding

        public <T> void addBinding​(java.lang.Class<T> class_,
                                   T object)
      • register

        public void register​(java.lang.Class<? extends MigrationTask> migrationTask)
        Register a new migration task
        Parameters:
        migrationTask - the task to be registered
      • migrate

        public boolean migrate​(step.core.collections.CollectionFactory collectionFactory,
                               Version from,
                               Version to)
        Runs all the migration tasks registered to migrate
        Parameters:
        from - the initial version
        to - the new version
        Returns:
        true if the migration ran successfully