org.cocome.tradingsystem.inventory.data.persistence.impl
Class PersistenceContextImpl

java.lang.Object
  extended by org.cocome.tradingsystem.inventory.data.persistence.impl.PersistenceContextImpl
All Implemented Interfaces:
PersistenceContext

public class PersistenceContextImpl
extends java.lang.Object
implements PersistenceContext

Author:
Yannick Welsch

Constructor Summary
PersistenceContextImpl(javax.persistence.EntityManager em)
           
 
Method Summary
 void close()
          disposes the current PersistenceContext.
 javax.persistence.EntityManager getEntityManager()
           
 TransactionContext getTransactionContext()
           
 void makePersistent(java.lang.Object o)
          persists the given object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistenceContextImpl

public PersistenceContextImpl(javax.persistence.EntityManager em)
Method Detail

getEntityManager

public javax.persistence.EntityManager getEntityManager()

getTransactionContext

public TransactionContext getTransactionContext()
Specified by:
getTransactionContext in interface PersistenceContext
Returns:
the TransactionContext

makePersistent

public void makePersistent(java.lang.Object o)
Description copied from interface: PersistenceContext
persists the given object

Specified by:
makePersistent in interface PersistenceContext
Parameters:
o - the object to be persisted

close

public void close()
Description copied from interface: PersistenceContext
disposes the current PersistenceContext. No method on the current Context should be called after calling this method.

Specified by:
close in interface PersistenceContext