Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hibernate.ejb
Class AbstractEntityManagerImpl

    java.lang.Object
      org.hibernate.ejb.AbstractEntityManagerImpl

All Implemented Interfaces:
  java.io.Serializable, javax.persistence.EntityManager, HibernateEntityManager, HibernateEntityManagerImplementor

Direct Known Subclasses:
  CurrentEntityManagerImpl, EntityManagerImpl

    public abstract class AbstractEntityManagerImpl

extends java.lang.Object
implements HibernateEntityManagerImplementor, java.io.Serializable

Author:
  Gavin King, Emmanuel Bernard
See Also:
  Serialized Form

Field Summary
`protected javax.persistence.PersistenceContextType` | `persistenceContextType`
`protected TransactionImpl` | `tx`

Constructor Summary
`protected` | `AbstractEntityManagerImpl(javax.persistence.PersistenceContextType type, javax.persistence.spi.PersistenceUnitTransactionType transactionType, java.util.Map properties)`

Method Summary
`void` | `clear()`
`boolean` | `contains(java.lang.Object entity)`
`javax.persistence.Query` | `createNamedQuery(java.lang.String name)`
`javax.persistence.Query` | `createNativeQuery(java.lang.String sqlString)`
`javax.persistence.Query` | `createNativeQuery(java.lang.String sqlString, java.lang.Class resultClass)`
`javax.persistence.Query` | `createNativeQuery(java.lang.String sqlString, java.lang.String resultSetMapping)`
`javax.persistence.Query` | `createQuery(java.lang.String ejbqlString)`
`
`<A> A`
` | `find(java.lang.Class<A> entityClass, java.lang.Object primaryKey)`
`void` | `flush()`
`java.lang.Object` | `getDelegate()` returns the underlying session
`javax.persistence.FlushModeType` | `getFlushMode()`
`protected abstract org.hibernate.Session` | `getRawSession()` Return a Session (even if the entity manager is closed
`
`<T> T`
` | `getReference(java.lang.Class<T> entityClass, java.lang.Object primaryKey)`
`abstract org.hibernate.Session` | `getSession()` return a Session
`javax.persistence.EntityTransaction` | `getTransaction()`
`boolean` | `isTransactionInProgress()`
`void` | `joinTransaction()`
`void` | `lock(java.lang.Object entity, javax.persistence.LockModeType lockMode)`
`protected void` | `markAsRollback()`
`
`<A> A`
` | `merge(A entity)`
`void` | `persist(java.lang.Object entity)`
`protected void` | `postInit()`
`void` | `refresh(java.lang.Object entity)`
`void` | `remove(java.lang.Object entity)`
`void` | `setFlushMode(javax.persistence.FlushModeType flushModeType)`
`void` | `throwPersistenceException(org.hibernate.HibernateException e)`
`void` | `throwPersistenceException(javax.persistence.PersistenceException e)`
`javax.persistence.PersistenceException` | `wrapStaleStateException(org.hibernate.StaleStateException e)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface javax.persistence.EntityManager
`close, isOpen`

Field Detail

### tx

    protected transient TransactionImpl tx

### persistenceContextType

    protected javax.persistence.PersistenceContextType persistenceContextType

Constructor Detail

### AbstractEntityManagerImpl

    protected AbstractEntityManagerImpl(javax.persistence.PersistenceContextType type,
                                        javax.persistence.spi.PersistenceUnitTransactionType transactionType,
                                        java.util.Map properties)

Method Detail

### postInit

    protected void postInit()

### createQuery

    public javax.persistence.Query createQuery(java.lang.String ejbqlString)

  Specified by:
    `createQuery` in interface `javax.persistence.EntityManager`

### createNamedQuery

    public javax.persistence.Query createNamedQuery(java.lang.String name)

  Specified by:
    `createNamedQuery` in interface `javax.persistence.EntityManager`

### createNativeQuery

    public javax.persistence.Query createNativeQuery(java.lang.String sqlString)

  Specified by:
    `createNativeQuery` in interface `javax.persistence.EntityManager`

### createNativeQuery

    public javax.persistence.Query createNativeQuery(java.lang.String sqlString,
                                                     java.lang.Class resultClass)

  Specified by:
    `createNativeQuery` in interface `javax.persistence.EntityManager`

### createNativeQuery

    public javax.persistence.Query createNativeQuery(java.lang.String sqlString,
                                                     java.lang.String resultSetMapping)

  Specified by:
    `createNativeQuery` in interface `javax.persistence.EntityManager`

### getReference

    public <T> T getReference(java.lang.Class<T> entityClass,
                              java.lang.Object primaryKey)

  Specified by:
    `getReference` in interface `javax.persistence.EntityManager`

### find

    public <A> A find(java.lang.Class<A> entityClass,
                      java.lang.Object primaryKey)

  Specified by:
    `find` in interface `javax.persistence.EntityManager`

### persist

    public void persist(java.lang.Object entity)

  Specified by:
    `persist` in interface `javax.persistence.EntityManager`

### merge

    public <A> A merge(A entity)

  Specified by:
    `merge` in interface `javax.persistence.EntityManager`

### remove

    public void remove(java.lang.Object entity)

  Specified by:
    `remove` in interface `javax.persistence.EntityManager`

### refresh

    public void refresh(java.lang.Object entity)

  Specified by:
    `refresh` in interface `javax.persistence.EntityManager`

### contains

    public boolean contains(java.lang.Object entity)

  Specified by:
    `contains` in interface `javax.persistence.EntityManager`

### flush

    public void flush()

  Specified by:
    `flush` in interface `javax.persistence.EntityManager`

### getSession

    public abstract org.hibernate.Session getSession()

  return a Session

  Specified by:
    `getSession` in interface `HibernateEntityManager`
  Throws:
    `java.lang.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 javax.persistence.EntityTransaction getTransaction()

  Specified by:
    `getTransaction` in interface `javax.persistence.EntityManager`

### setFlushMode

    public void setFlushMode(javax.persistence.FlushModeType flushModeType)

  Specified by:
    `setFlushMode` in interface `javax.persistence.EntityManager`

### clear

    public void clear()

  Specified by:
    `clear` in interface `javax.persistence.EntityManager`

### getFlushMode

    public javax.persistence.FlushModeType getFlushMode()

  Specified by:
    `getFlushMode` in interface `javax.persistence.EntityManager`

### lock

    public void lock(java.lang.Object entity,
                     javax.persistence.LockModeType lockMode)

  Specified by:
    `lock` in interface `javax.persistence.EntityManager`

### isTransactionInProgress

    public boolean isTransactionInProgress()

  Specified by:
    `isTransactionInProgress` in interface `HibernateEntityManagerImplementor`

### markAsRollback

    protected void markAsRollback()

### joinTransaction

    public void joinTransaction()

  Specified by:
    `joinTransaction` in interface `javax.persistence.EntityManager`

### getDelegate

    public java.lang.Object getDelegate()

  returns the underlying session

  Specified by:
    `getDelegate` in interface `javax.persistence.EntityManager`

### throwPersistenceException

    public void throwPersistenceException(javax.persistence.PersistenceException e)

  Specified by:
    `throwPersistenceException` in interface `HibernateEntityManagerImplementor`

### throwPersistenceException

    public void throwPersistenceException(org.hibernate.HibernateException e)

  Specified by:
    `throwPersistenceException` in interface `HibernateEntityManagerImplementor`

### wrapStaleStateException

    public javax.persistence.PersistenceException wrapStaleStateException(org.hibernate.StaleStateException e)

  Specified by:
    `wrapStaleStateException` in interface `HibernateEntityManagerImplementor`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD