|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object play.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(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)
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 stateful things. |
void |
onApplicationStop()
Called at application stop (and before each reloading) Time to shutdown stateful 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(RootParamNode rootParamNode, java.lang.String name, java.lang.Class clazz, java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotations)
PlayPlugin
bind
in class PlayPlugin
public java.lang.Object bindBean(RootParamNode rootParamNode, java.lang.String name, java.lang.Object bean)
PlayPlugin
bindBean
in class PlayPlugin
public void enhance(ApplicationClasses.ApplicationClass applicationClass) throws java.lang.Exception
PlayPlugin
enhance
in class PlayPlugin
java.lang.Exception
public void onApplicationStart()
PlayPlugin
onApplicationStart
in class PlayPlugin
public void onApplicationStop()
PlayPlugin
onApplicationStop
in class PlayPlugin
public void beforeInvocation()
PlayPlugin
beforeInvocation
in class PlayPlugin
public void afterInvocation()
PlayPlugin
afterInvocation
in class PlayPlugin
public void onInvocationException(java.lang.Throwable e)
PlayPlugin
onInvocationException
in class PlayPlugin
e
- The catched exception.public void invocationFinally()
PlayPlugin
invocationFinally
in class PlayPlugin
public 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 PlayPlugin
public void afterFixtureLoad()
afterFixtureLoad
in class PlayPlugin
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |