org.hibernate.ejb
Class AbstractEntityManagerImpl
java.lang.Object
org.hibernate.ejb.AbstractEntityManagerImpl
- All Implemented Interfaces:
- Serializable, EntityManager, HibernateEntityManager, HibernateEntityManagerImplementor
- Direct Known Subclasses:
- CurrentEntityManagerImpl, EntityManagerImpl
public abstract class AbstractEntityManagerImpl
- extends Object
- implements HibernateEntityManagerImplementor, Serializable
- Author:
- Gavin King, Emmanuel Bernard
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tx
protected transient TransactionImpl tx
persistenceContextType
protected PersistenceContextType persistenceContextType
AbstractEntityManagerImpl
protected AbstractEntityManagerImpl(PersistenceContextType type,
PersistenceUnitTransactionType transactionType,
Map properties)
postInit
protected void postInit()
createQuery
public Query createQuery(String ejbqlString)
- Specified by:
createQuery
in interface EntityManager
createNamedQuery
public Query createNamedQuery(String name)
- Specified by:
createNamedQuery
in interface EntityManager
createNativeQuery
public Query createNativeQuery(String sqlString)
- Specified by:
createNativeQuery
in interface EntityManager
createNativeQuery
public Query createNativeQuery(String sqlString,
Class resultClass)
- Specified by:
createNativeQuery
in interface EntityManager
createNativeQuery
public Query createNativeQuery(String sqlString,
String resultSetMapping)
- Specified by:
createNativeQuery
in interface EntityManager
getReference
public <T> T getReference(Class<T> entityClass,
Object primaryKey)
- Specified by:
getReference
in interface EntityManager
find
public <A> A find(Class<A> entityClass,
Object primaryKey)
- Specified by:
find
in interface EntityManager
persist
public void persist(Object entity)
- Specified by:
persist
in interface EntityManager
merge
public <A> A merge(A entity)
- Specified by:
merge
in interface EntityManager
remove
public void remove(Object entity)
- Specified by:
remove
in interface EntityManager
refresh
public void refresh(Object entity)
- Specified by:
refresh
in interface EntityManager
contains
public boolean contains(Object entity)
- Specified by:
contains
in interface EntityManager
flush
public void flush()
- Specified by:
flush
in interface EntityManager
getSession
public abstract org.hibernate.Session getSession()
- return a Session
- Specified by:
getSession
in interface HibernateEntityManager
- Throws:
IllegalStateException
- if the entity manager is closed
getRawSession
protected abstract org.hibernate.Session getRawSession()
- Return a Session (even if the entity manager is closed
getTransaction
public EntityTransaction getTransaction()
- Specified by:
getTransaction
in interface EntityManager
setFlushMode
public void setFlushMode(FlushModeType flushModeType)
- Specified by:
setFlushMode
in interface EntityManager
clear
public void clear()
- Specified by:
clear
in interface EntityManager
getFlushMode
public FlushModeType getFlushMode()
- Specified by:
getFlushMode
in interface EntityManager
lock
public void lock(Object entity,
LockModeType lockMode)
- Specified by:
lock
in interface EntityManager
isTransactionInProgress
public boolean isTransactionInProgress()
- Specified by:
isTransactionInProgress
in interface HibernateEntityManagerImplementor
markAsRollback
protected void markAsRollback()
joinTransaction
public void joinTransaction()
- Specified by:
joinTransaction
in interface EntityManager
getDelegate
public Object getDelegate()
- returns the underlying session
- Specified by:
getDelegate
in interface EntityManager
throwPersistenceException
public void throwPersistenceException(PersistenceException e)
- Specified by:
throwPersistenceException
in interface HibernateEntityManagerImplementor
throwPersistenceException
public void throwPersistenceException(org.hibernate.HibernateException e)
- Specified by:
throwPersistenceException
in interface HibernateEntityManagerImplementor
wrapStaleStateException
public PersistenceException wrapStaleStateException(org.hibernate.StaleStateException e)
- Specified by:
wrapStaleStateException
in interface HibernateEntityManagerImplementor
Copyright © 2011. All Rights Reserved.