|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectplay.PlayPlugin
play.db.jpa.JPAPlugin
public class JPAPlugin
JPA Plugin
| Nested Class Summary | |
|---|---|
static class |
JPAPlugin.JPAModelLoader
|
| Field Summary | |
|---|---|
static boolean |
autoTxs
|
| Fields inherited from class play.PlayPlugin |
|---|
index |
| Constructor Summary | |
|---|---|
JPAPlugin()
|
|
| Method Summary | |
|---|---|
void |
afterFixtureLoad()
|
void |
afterInvocation()
Called after an invocation. |
void |
beforeInvocation()
Called before a Play! invocation. |
java.lang.Object |
bind(java.lang.String name,
java.lang.Class clazz,
java.lang.reflect.Type type,
java.lang.annotation.Annotation[] annotations,
java.util.Map<java.lang.String,java.lang.String[]> params)
Called when play need to bind a Java object from HTTP params |
java.lang.Object |
bind(java.lang.String name,
java.lang.Object o,
java.util.Map<java.lang.String,java.lang.String[]> params)
Called when play need to bind an existing Java object from HTTP params |
static void |
closeTx(boolean rollback)
clear current JPA context and transaction |
void |
enhance(ApplicationClasses.ApplicationClass applicationClass)
Enhance this class |
void |
invocationFinally()
Called at the end of the invocation. |
Model.Factory |
modelFactory(java.lang.Class<? extends Model> modelClass)
|
void |
onApplicationStart()
Called at application start (and at each reloading) Time to start statefull things. |
void |
onApplicationStop()
Called at application stop (and before each reloading) Time to shutdown statefull things. |
void |
onInvocationException(java.lang.Throwable e)
Called if an exception occured during the invocation. |
static void |
startTx(boolean readonly)
initialize the JPA context and starts a JPA transaction |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static boolean autoTxs
| Constructor Detail |
|---|
public JPAPlugin()
| Method Detail |
|---|
public java.lang.Object bind(java.lang.String name,
java.lang.Class clazz,
java.lang.reflect.Type type,
java.lang.annotation.Annotation[] annotations,
java.util.Map<java.lang.String,java.lang.String[]> params)
PlayPlugin
bind in class PlayPlugin
public java.lang.Object bind(java.lang.String name,
java.lang.Object o,
java.util.Map<java.lang.String,java.lang.String[]> params)
PlayPlugin
bind in class PlayPlugin
public void enhance(ApplicationClasses.ApplicationClass applicationClass)
throws java.lang.Exception
PlayPlugin
enhance in class PlayPluginjava.lang.Exceptionpublic void onApplicationStart()
PlayPlugin
onApplicationStart in class PlayPluginpublic void onApplicationStop()
PlayPlugin
onApplicationStop in class PlayPluginpublic void beforeInvocation()
PlayPlugin
beforeInvocation in class PlayPluginpublic void afterInvocation()
PlayPlugin
afterInvocation in class PlayPluginpublic void onInvocationException(java.lang.Throwable e)
PlayPlugin
onInvocationException in class PlayPlugine - The catched exception.public void invocationFinally()
PlayPlugin
invocationFinally in class PlayPluginpublic static void startTx(boolean readonly)
readonly - true for a readonly transactionautoCommit - true to automatically commit the DB transaction after each JPA statementpublic static void closeTx(boolean rollback)
rollback - shall current transaction be committed (false) or cancelled (true)public Model.Factory modelFactory(java.lang.Class<? extends Model> modelClass)
modelFactory in class PlayPluginpublic void afterFixtureLoad()
afterFixtureLoad in class PlayPlugin
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||