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.
|
Object |
bind(RootParamNode rootParamNode,
String name,
Class clazz,
Type type,
Annotation[] annotations)
Called when play need to bind a Java object from HTTP params.
|
Object |
bindBean(RootParamNode rootParamNode,
String name,
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 EntityManager |
createEntityManager() |
EntityManager |
em(String key) |
void |
enhance(ApplicationClasses.ApplicationClass applicationClass)
Enhance this class
|
static String |
getDefaultDialect(Configuration dbConfig,
String driver) |
static String |
getDefaultDialect(String driver) |
PlayPlugin.Filter<Object> |
getFilter()
Return the filter implementation for this plugin.
|
Model.Factory |
modelFactory(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, hasFilter, invocationFinally, loadTemplate, onActionInvocationFinally, onActionInvocationResult, onApplicationReady, onClassesChange, onConfigurationRead, onEvent, onInvocationException, onInvocationSuccess, onLoad, onRequestRouting, onRoutesLoaded, onTemplateCompilation, overrideTemplateSource, postEvent, rawInvocation, routeRequest, runTest, serveStatic, unBind, willBeValidatedpublic Object bind(RootParamNode rootParamNode, String name, Class clazz, Type type, Annotation[] annotations)
PlayPluginbind in class PlayPluginpublic Object bindBean(RootParamNode rootParamNode, String name, Object bean)
PlayPluginbindBean in class PlayPluginpublic void enhance(ApplicationClasses.ApplicationClass applicationClass) throws Exception
PlayPluginenhance in class PlayPluginExceptionpublic EntityManager em(String key)
public void onApplicationStart()
onApplicationStart in class PlayPluginpublic static String getDefaultDialect(Configuration dbConfig, String driver)
public void onApplicationStop()
PlayPluginonApplicationStop in class PlayPluginpublic void afterFixtureLoad()
afterFixtureLoad in class PlayPluginpublic void afterInvocation()
PlayPluginafterInvocation in class PlayPluginpublic PlayPlugin.Filter<Object> getFilter()
PlayPlugingetFilter in class PlayPluginpublic static 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(Class<? extends Model> modelClass)
modelFactory in class PlayPluginGuillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly