com.indexdata.utils.persistence
Class EntityUtil

java.lang.Object
  extended by com.indexdata.utils.persistence.EntityUtil

public class EntityUtil
extends Object

Author:
jakub

Constructor Summary
EntityUtil()
           
 
Method Summary
static void closeManager()
          Closes EntitymManager associated with current thread (if any).
static javax.persistence.EntityManager getManager()
          Returns an entity manager associated with a current thread.
static boolean isInitialized()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityUtil

public EntityUtil()
Method Detail

isInitialized

public static boolean isInitialized()

getManager

public static javax.persistence.EntityManager getManager()
Returns an entity manager associated with a current thread. It is usually used in combination with a servltet filter or listener and the manager is automatically closed at the end of the request.

Returns:
entity manager associated with the current thread

closeManager

public static void closeManager()
Closes EntitymManager associated with current thread (if any).



Copyright © 2012. All Rights Reserved.