play.db.jpa
类 JPAContext

java.lang.Object
  继承者 play.db.jpa.JPAContext

public class JPAContext
extends java.lang.Object

JPA Support


构造方法摘要
protected JPAContext(JPAConfig jpaConfig, boolean readonly, boolean beginTransaction)
           
 
方法摘要
protected  void close()
           
 void closeTx(boolean rollback)
          clear current JPA context and transaction
 EntityManager em()
           
 int execute(java.lang.String query)
          Execute a JPQL query
 JPAConfig getJPAConfig()
           
 boolean isInsideTransaction()
           
 void setRollbackOnly()
           
 
从类 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