play.db.jpa
Class JPA

java.lang.Object
  extended by play.db.jpa.JPA

public class JPA
extends java.lang.Object

JPA Support


Field Summary
 EntityManager entityManager
           
static EntityManagerFactory entityManagerFactory
           
static java.lang.ThreadLocal<JPA> local
           
 
Constructor Summary
JPA()
           
 
Method Summary
static EntityManager em()
           
static int execute(java.lang.String query)
          Execute a JPQL query
static boolean isEnabled()
           
static EntityManager newEntityManager()
           
static void setRollbackOnly()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

entityManagerFactory

public static EntityManagerFactory entityManagerFactory

local

public static java.lang.ThreadLocal<JPA> local

entityManager

public EntityManager entityManager
Constructor Detail

JPA

public JPA()
Method Detail

em

public static EntityManager em()

setRollbackOnly

public static void setRollbackOnly()

isEnabled

public static boolean isEnabled()
Returns:
true if an entityManagerFactory has started

execute

public static int execute(java.lang.String query)
Execute a JPQL query


newEntityManager

public static EntityManager newEntityManager()


Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly