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
 javax.persistence.EntityManager entityManager
           
static javax.persistence.EntityManagerFactory entityManagerFactory
           
static java.lang.ThreadLocal<JPA> local
           
 
Constructor Summary
JPA()
           
 
Method Summary
static void abort()
          Deprecated. 
static javax.persistence.EntityManager em()
           
static int execute(java.lang.String query)
          Execute a JPQL query
static javax.persistence.EntityManager getEntityManager()
          Deprecated. 
static boolean isEnabled()
           
static javax.persistence.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 javax.persistence.EntityManagerFactory entityManagerFactory

local

public static java.lang.ThreadLocal<JPA> local

entityManager

public javax.persistence.EntityManager entityManager
Constructor Detail

JPA

public JPA()
Method Detail

getEntityManager

@Deprecated
public static javax.persistence.EntityManager getEntityManager()
Deprecated. 


em

public static javax.persistence.EntityManager em()

abort

@Deprecated
public static void abort()
Deprecated. 


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 javax.persistence.EntityManager newEntityManager()


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