play.db
类 Evolutions

java.lang.Object
  继承者 play.PlayPlugin
      继承者 play.db.Evolutions
所有已实现的接口:
java.lang.Comparable<PlayPlugin>

public class Evolutions
extends PlayPlugin

Handles migration of data. Does only support the default DBConfig


嵌套类摘要
static class Evolutions.Evolution
           
static class Evolutions.InconsistentDatabase
           
static class Evolutions.InvalidDatabaseRevision
           
 
字段摘要
 
从类 play.PlayPlugin 继承的字段
index
 
构造方法摘要
Evolutions()
           
 
方法摘要
static boolean applyScript(boolean runScript)
           
 void beforeInvocation()
          Called before a Play!
static void checkEvolutionsState()
           
protected static javax.sql.DataSource getDatasource()
           
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)
           
 
从类 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
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

Evolutions

public Evolutions()
方法详细信息

getDatasource

protected static javax.sql.DataSource getDatasource()

main

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

rawInvocation

public boolean rawInvocation(Http.Request request,
                             Http.Response response)
                      throws java.lang.Exception
从类 PlayPlugin 复制的描述
Give a chance to this plugin to fully manage this request

覆盖:
PlayPlugin 中的 rawInvocation
参数:
request - The Play request
response - The Play response
返回:
true if this plugin has managed this request
抛出:
java.lang.Exception

beforeInvocation

public void beforeInvocation()
从类 PlayPlugin 复制的描述
Called before a Play! invocation. Time to prepare request specific things.

覆盖:
PlayPlugin 中的 beforeInvocation

onApplicationStart

public void onApplicationStart()
从类 PlayPlugin 复制的描述
Called at application start (and at each reloading) Time to start stateful things.

覆盖:
PlayPlugin 中的 onApplicationStart

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