play.db
Class Evolutions

java.lang.Object
  extended by play.PlayPlugin
      extended by 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
static class Evolutions.Evolution
           
static class Evolutions.InconsistentDatabase
           
static class Evolutions.InvalidDatabaseRevision
           
 
Field Summary
 
Fields inherited from class play.PlayPlugin
index
 
Constructor Summary
Evolutions()
           
 
Method Summary
static boolean applyScript(boolean runScript)
           
 void beforeInvocation()
          Called before a Play! invocation.
static void checkEvolutionsState()
           
static java.util.List<Evolutions.Evolution> getEvolutionScript()
           
static java.util.Stack<Evolutions.Evolution> listApplicationEvolutions()
           
static java.util.Stack<Evolutions.Evolution> listDatabaseEvolutions()
           
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 java.lang.String toHumanReadableScript(java.util.List<Evolutions.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, getJsonStatus, getMessage, getStatus, invocationFinally, loadTemplate, modelFactory, 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
 

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

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

resolve

public static void resolve(int revision)

applyScript

public static boolean applyScript(boolean runScript)

toHumanReadableScript

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

checkEvolutionsState

public static void checkEvolutionsState()

getEvolutionScript

public static java.util.List<Evolutions.Evolution> getEvolutionScript()

listApplicationEvolutions

public static java.util.Stack<Evolutions.Evolution> listApplicationEvolutions()

listDatabaseEvolutions

public static java.util.Stack<Evolutions.Evolution> listDatabaseEvolutions()


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