play.db.jpa
类 JPAContext
java.lang.Object
play.db.jpa.JPAContext
public class JPAContext
- extends java.lang.Object
JPA Support
从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JPAContext
protected JPAContext(JPAConfig jpaConfig,
boolean readonly,
boolean beginTransaction)
getJPAConfig
public JPAConfig getJPAConfig()
closeTx
public void closeTx(boolean rollback)
- clear current JPA context and transaction
- 参数:
rollback
- shall current transaction be committed (false) or cancelled (true)
close
protected void close()
em
public EntityManager em()
setRollbackOnly
public void setRollbackOnly()
execute
public int execute(java.lang.String query)
- Execute a JPQL query
isInsideTransaction
public boolean isInsideTransaction()
- 返回:
- true if current thread is running inside a transaction
Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly