cuba.wired.jpa
Class WiredEntityManagerProxy
java.lang.Object
cuba.wired.jpa.WiredEntityManagerProxy
- All Implemented Interfaces:
- CubaEntityManager, javax.persistence.EntityManager
public class WiredEntityManagerProxy
- extends java.lang.Object
- implements javax.persistence.EntityManager, CubaEntityManager
This class wraps the EntityManager.
This class is injected into the Wired-Adapter as a Proxy for javax.persistence.EntityManager.
It allows lazy initialization of the EntityManager. This is required because during injection-time
no transaction is active.
- Author:
- mbartels
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WiredEntityManagerProxy
public WiredEntityManagerProxy(WiredContainer container,
WiredManagedEntityManagerFactory emf)
clear
public void clear()
- EntityManager methods
- Specified by:
clear
in interface javax.persistence.EntityManager
close
public void close()
- Specified by:
close
in interface javax.persistence.EntityManager
contains
public boolean contains(java.lang.Object arg0)
- Specified by:
contains
in interface javax.persistence.EntityManager
createNamedQuery
public javax.persistence.Query createNamedQuery(java.lang.String arg0)
- Specified by:
createNamedQuery
in interface javax.persistence.EntityManager
createNativeQuery
public javax.persistence.Query createNativeQuery(java.lang.String arg0,
java.lang.Class arg1)
- Specified by:
createNativeQuery
in interface javax.persistence.EntityManager
createNativeQuery
public javax.persistence.Query createNativeQuery(java.lang.String arg0,
java.lang.String arg1)
- Specified by:
createNativeQuery
in interface javax.persistence.EntityManager
createNativeQuery
public javax.persistence.Query createNativeQuery(java.lang.String arg0)
- Specified by:
createNativeQuery
in interface javax.persistence.EntityManager
createQuery
public javax.persistence.Query createQuery(java.lang.String arg0)
- Specified by:
createQuery
in interface javax.persistence.EntityManager
find
public <T> T find(java.lang.Class<T> arg0,
java.lang.Object arg1)
- Specified by:
find
in interface javax.persistence.EntityManager
flush
public void flush()
- Specified by:
flush
in interface javax.persistence.EntityManager
getDelegate
public java.lang.Object getDelegate()
- Specified by:
getDelegate
in interface javax.persistence.EntityManager
getFlushMode
public javax.persistence.FlushModeType getFlushMode()
- Specified by:
getFlushMode
in interface javax.persistence.EntityManager
getReference
public <T> T getReference(java.lang.Class<T> arg0,
java.lang.Object arg1)
- Specified by:
getReference
in interface javax.persistence.EntityManager
getTransaction
public javax.persistence.EntityTransaction getTransaction()
- Specified by:
getTransaction
in interface javax.persistence.EntityManager
isOpen
public boolean isOpen()
- Specified by:
isOpen
in interface javax.persistence.EntityManager
joinTransaction
public void joinTransaction()
- Specified by:
joinTransaction
in interface javax.persistence.EntityManager
lock
public void lock(java.lang.Object arg0,
javax.persistence.LockModeType arg1)
- Specified by:
lock
in interface javax.persistence.EntityManager
merge
public <T> T merge(T arg0)
- Specified by:
merge
in interface javax.persistence.EntityManager
persist
public void persist(java.lang.Object arg0)
- Specified by:
persist
in interface javax.persistence.EntityManager
refresh
public void refresh(java.lang.Object arg0)
- Specified by:
refresh
in interface javax.persistence.EntityManager
remove
public void remove(java.lang.Object arg0)
- Specified by:
remove
in interface javax.persistence.EntityManager
setFlushMode
public void setFlushMode(javax.persistence.FlushModeType arg0)
- Specified by:
setFlushMode
in interface javax.persistence.EntityManager