play.db

## Class Evolutions

- java.lang.Object
- - play.PlayPlugin
  - - play.db.Evolutions

- All Implemented Interfaces:
    java.lang.Comparable<PlayPlugin>

      public class Evolutions
      extends PlayPlugin

  Handles migration of data. Does only support the default DBConfig

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class play.PlayPlugin

      `PlayPlugin.Filter<T>`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static java.io.File` | `evolutionsDirectory`

    - ### Fields inherited from class play.PlayPlugin

      `index`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Evolutions()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `applyScript(boolean runScript, java.lang.String moduleKey, VirtualFile evolutionsDirectory)`
    `static boolean` | `applyScript(java.lang.String dbName, boolean runScript, java.lang.String moduleKey, VirtualFile evolutionsDirectory)`
    `static boolean` | `autoCommit()`
    `void` | `beforeInvocation()` Called before a Play! invocation.
    `static void` | `checkEvolutionsState()`
    `static void` | `checkEvolutionsState(java.lang.String dbName)`
    `static java.util.List<Evolution>` | `getEvolutionScript(java.lang.String dbName, java.lang.String moduleKey, VirtualFile evolutionsDirectory)`
    `static java.util.Stack<Evolution>` | `listApplicationEvolutions(java.lang.String dBName, java.lang.String moduleKey, VirtualFile evolutionsDirectory)`
    `static java.util.Stack<Evolution>` | `listDatabaseEvolutions(java.lang.String dbName, java.lang.String moduleKey)`
    `static void` | `main(java.lang.String[] args)`
    `void` | `onApplicationStart()` Called at application start (and at each reloading) Time to start stateful things.
    `boolean` | `rawInvocation(Http.Request request, Http.Response response)` Give a chance to this plugin to fully manage this request
    `static void` | `resolve(int revision)`
    `static void` | `resolve(java.lang.String dBName, int revision)`
    `static void` | `resolve(java.lang.String dBName, java.lang.String moduleKey, int revision)`
    `static java.lang.String` | `toHumanReadableScript(java.util.List<Evolution> evolutionScript)`

    - ### Methods inherited from class play.PlayPlugin

      `addMimeTypes, addTemplateExtensions, afterActionInvocation, afterApplicationStart, afterFixtureLoad, afterInvocation, beforeActionInvocation, beforeDetectingChanges, bind, bind, bind, bindBean, compareTo, compileAll, compileSources, detectChange, detectClassesChange, enhance, getFilter, getFunctionalTests, getJsonStatus, getMessage, getStatus, getUnitTests, hasFilter, invocationFinally, loadTemplate, modelFactory, onActionInvocationFinally, onActionInvocationResult, onApplicationReady, onApplicationStop, onClassesChange, onConfigurationRead, onEvent, onInvocationException, onInvocationSuccess, onLoad, onRequestRouting, onRoutesLoaded, onTemplateCompilation, overrideTemplateSource, postEvent, routeRequest, runTest, serveStatic, unBind, willBeValidated`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### evolutionsDirectory

          protected static java.io.File evolutionsDirectory

  - ### Constructor Detail

    - #### Evolutions

          public Evolutions()

  - ### Method Detail

    - #### main

          public static void main(java.lang.String[] args)
                           throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`

    - #### rawInvocation

          public boolean rawInvocation(Http.Request request,
                                       Http.Response response)
                                throws java.lang.Exception

      Description copied from class: `PlayPlugin`
      Give a chance to this plugin to fully manage this request
      Overrides:
        `rawInvocation` in class `PlayPlugin`
      Parameters:
        `request` - The Play request
        `response` - The Play response
      Returns:
        true if this plugin has managed this request
      Throws:
        `java.lang.Exception` - if cannot enhance the class

    - #### beforeInvocation

          public void beforeInvocation()

      Description copied from class: `PlayPlugin`
      Called before a Play! invocation. Time to prepare request specific things.
      Overrides:
        `beforeInvocation` in class `PlayPlugin`

    - #### onApplicationStart

          public void onApplicationStart()

      Description copied from class: `PlayPlugin`
      Called at application start (and at each reloading) Time to start stateful things.
      Overrides:
        `onApplicationStart` in class `PlayPlugin`

    - #### autoCommit

          public static boolean autoCommit()

    - #### resolve

          public static void resolve(int revision)

    - #### resolve

          public static void resolve(java.lang.String dBName,
                                     int revision)

    - #### resolve

          public static void resolve(java.lang.String dBName,
                                     java.lang.String moduleKey,
                                     int revision)

    - #### applyScript

          public static boolean applyScript(boolean runScript,
                                            java.lang.String moduleKey,
                                            VirtualFile evolutionsDirectory)

    - #### applyScript

          public static boolean applyScript(java.lang.String dbName,
                                            boolean runScript,
                                            java.lang.String moduleKey,
                                            VirtualFile evolutionsDirectory)

    - #### toHumanReadableScript

          public static java.lang.String toHumanReadableScript(java.util.List<Evolution> evolutionScript)

    - #### checkEvolutionsState

          public static void checkEvolutionsState()

    - #### checkEvolutionsState

          public static void checkEvolutionsState(java.lang.String dbName)

    - #### getEvolutionScript

          public static java.util.List<Evolution> getEvolutionScript(java.lang.String dbName,
                                                                     java.lang.String moduleKey,
                                                                     VirtualFile evolutionsDirectory)

    - #### listApplicationEvolutions

          public static java.util.Stack<Evolution> listApplicationEvolutions(java.lang.String dBName,
                                                                             java.lang.String moduleKey,
                                                                             VirtualFile evolutionsDirectory)

    - #### listDatabaseEvolutions

          public static java.util.Stack<Evolution> listDatabaseEvolutions(java.lang.String dbName,
                                                                          java.lang.String moduleKey)

Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly