cuba.wired.jpa
Class WiredManagedEntityManager
java.lang.Object
cuba.wired.jpa.WiredManagedEntityManager
- All Implemented Interfaces:
- CubaEntityManager, javax.persistence.EntityManager
public class WiredManagedEntityManager
- extends java.lang.Object
- implements javax.persistence.EntityManager, CubaEntityManager
This class is a thin wrapper around javax.persistence.EntityManager. It is needed for 2 purposes:
1) It implements CubaEntityManager, which is required to make the CUBA core independent from JPA classes and interfaces
2) It wraps the Method of the persistence providers EntityManager implementation, that allows for example to ensure that
close() is not called on container managed EntityManagers
- Author:
- mbartels
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WiredManagedEntityManager
public WiredManagedEntityManager(javax.persistence.EntityManager em)
clear
public void clear()
- 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