public class JPAPlugin extends PlayPlugin
| Modifier and Type | Class and Description |
|---|---|
class |
JPAPlugin.TransactionalFilter |
PlayPlugin.Filter<T>| Modifier and Type | Field and Description |
|---|---|
static boolean |
autoTxs |
index| Constructor and Description |
|---|
JPAPlugin() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterFixtureLoad() |
void |
afterInvocation()
Called after an invocation.
|
java.lang.Object |
bind(RootParamNode rootParamNode,
java.lang.String name,
java.lang.Class clazz,
java.lang.reflect.Type type,
java.lang.annotation.Annotation[] annotations)
Called when play need to bind a Java object from HTTP params.
|
java.lang.Object |
bindBean(RootParamNode rootParamNode,
java.lang.String name,
java.lang.Object bean)
Called when play need to bind an existing Java object from HTTP params.
|
static void |
closeTx(boolean rollback)
Deprecated.
see
JPA.rollbackTx(java.lang.String) and JPA.closeTx(java.lang.String) method |
static javax.persistence.EntityManager |
createEntityManager() |
javax.persistence.EntityManager |
em(java.lang.String key) |
void |
enhance(ApplicationClasses.ApplicationClass applicationClass)
Enhance this class
|
static java.lang.String |
getDefaultDialect(Configuration dbConfig,
java.lang.String driver) |
static java.lang.String |
getDefaultDialect(java.lang.String driver) |
PlayPlugin.Filter |
getFilter()
Return the filter implementation for this plugin.
|
Model.Factory |
modelFactory(java.lang.Class<? extends Model> modelClass) |
void |
onApplicationStart()
Reads the configuration file and initialises required JPA EntityManagerFactories.
|
void |
onApplicationStop()
Called at application stop (and before each reloading)
Time to shutdown stateful things.
|
static void |
startTx(boolean readonly)
Deprecated.
see JPA startTx() method
|
addMimeTypes, addTemplateExtensions, afterActionInvocation, afterApplicationStart, beforeActionInvocation, beforeDetectingChanges, beforeInvocation, bind, bind, compareTo, compileAll, compileSources, detectChange, detectClassesChange, getFunctionalTests, getJsonStatus, getMessage, getStatus, getUnitTests, invocationFinally, loadTemplate, onActionInvocationFinally, onActionInvocationResult, onApplicationReady, onClassesChange, onConfigurationRead, onEvent, onInvocationException, onInvocationSuccess, onLoad, onRequestRouting, onRoutesLoaded, onTemplateCompilation, overrideTemplateSource, postEvent, rawInvocation, routeRequest, runTest, serveStatic, unBind, willBeValidatedpublic java.lang.Object bind(RootParamNode rootParamNode, java.lang.String name, java.lang.Class clazz, java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotations)
PlayPluginbind in class PlayPluginpublic java.lang.Object bindBean(RootParamNode rootParamNode, java.lang.String name, java.lang.Object bean)
PlayPluginbindBean in class PlayPluginpublic void enhance(ApplicationClasses.ApplicationClass applicationClass) throws java.lang.Exception
PlayPluginenhance in class PlayPluginjava.lang.Exceptionpublic javax.persistence.EntityManager em(java.lang.String key)
public void onApplicationStart()
onApplicationStart in class PlayPluginpublic static java.lang.String getDefaultDialect(java.lang.String driver)
public static java.lang.String getDefaultDialect(Configuration dbConfig, java.lang.String driver)
public void onApplicationStop()
PlayPluginonApplicationStop in class PlayPluginpublic void afterFixtureLoad()
afterFixtureLoad in class PlayPluginpublic void afterInvocation()
PlayPluginafterInvocation in class PlayPluginpublic PlayPlugin.Filter getFilter()
PlayPlugingetFilter in class PlayPluginpublic static javax.persistence.EntityManager createEntityManager()
@Deprecated public static void startTx(boolean readonly)
readonly - true for a readonly transaction@Deprecated public static void closeTx(boolean rollback)
JPA.rollbackTx(java.lang.String) and JPA.closeTx(java.lang.String) methodrollback - shall current transaction be committed (false) or cancelled (true)public Model.Factory modelFactory(java.lang.Class<? extends Model> modelClass)
modelFactory in class PlayPluginGuillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly