org.granite.tide.seam.lazy
Class PersistenceContextManager
java.lang.Object
org.granite.tide.seam.lazy.PersistenceContextManager
- All Implemented Interfaces:
- TidePersistenceManager
- Direct Known Subclasses:
- HibernatePersistenceControllerManager, PersistenceControllerManager, SeamEntityManager
public class PersistenceContextManager
- extends Object
- implements TidePersistenceManager
Manager responsible for the maintaining a refernce for the PersistenceContext(JPA).
- Author:
- CIngram
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PersistenceContextManager
public PersistenceContextManager()
PersistenceContextManager
public PersistenceContextManager(EntityManager em)
attachEntity
public Object attachEntity(Object entity,
String[] propertyNames)
- Attach the passed in entity with the EntityManager.
- Specified by:
attachEntity in interface TidePersistenceManager
- Parameters:
entity - propertyNames - array of property names to fetch
- Returns:
- the attached entity object
fetchEntity
public Object fetchEntity(Object entity,
String[] fetch)
- attaches the entity to the JPA context.
- Returns:
- the attached entity