public interface HibernateEntityManagerImplementor extends HibernateEntityManager
EntityManager implementation.| Modifier and Type | Interface and Description |
|---|---|
static interface |
HibernateEntityManagerImplementor.Options |
| Modifier and Type | Method and Description |
|---|---|
RuntimeException |
convert(HibernateException e)
Converts a Hibernate-specific exception into a JPA-specified exception; note that the JPA sepcification makes use
of exceptions outside its exception hierarchy, though they are all runtime exceptions.
|
RuntimeException |
convert(HibernateException e,
LockOptions lockOptions)
Converts a Hibernate-specific exception into a JPA-specified exception; note that the JPA sepcification makes use
of exceptions outside its exception hierarchy, though they are all runtime exceptions.
|
<T> TypedQuery<T> |
createQuery(String jpaqlString,
Class<T> resultClass,
Selection selection,
HibernateEntityManagerImplementor.Options options)
Used during "compiling" a JPA criteria query.
|
HibernateEntityManagerFactory |
getFactory()
Get access to the Hibernate extended EMF contract.
|
LockOptions |
getLockRequest(LockModeType lockModeType,
Map<String,Object> properties)
Convert from JPA 2
LockModeType & properties into LockOptions |
void |
handlePersistenceException(PersistenceException e)
Handles marking for rollback and other such operations that need to occur depending on the type of
exception being handled.
|
boolean |
isTransactionInProgress()
Provides access to whether a transaction is currently in progress.
|
void |
throwPersistenceException(HibernateException e)
Delegates to
convert(org.hibernate.HibernateException, org.hibernate.LockOptions) and then throws the given exception. |
void |
throwPersistenceException(PersistenceException e)
Delegates to
handlePersistenceException(javax.persistence.PersistenceException) and then throws the given exception. |
PersistenceException |
wrapStaleStateException(StaleStateException e) |
getSessionclear, close, contains, createNamedQuery, createNamedQuery, createNativeQuery, createNativeQuery, createNativeQuery, createQuery, createQuery, createQuery, detach, find, find, find, find, flush, getCriteriaBuilder, getDelegate, getEntityManagerFactory, getFlushMode, getLockMode, getMetamodel, getProperties, getReference, getTransaction, isOpen, joinTransaction, lock, lock, merge, persist, refresh, refresh, refresh, refresh, remove, setFlushMode, setProperty, unwrapHibernateEntityManagerFactory getFactory()
boolean isTransactionInProgress()
void handlePersistenceException(PersistenceException e)
e - The exception being handled.void throwPersistenceException(PersistenceException e)
handlePersistenceException(javax.persistence.PersistenceException) and then throws the given exception.e - The exception being handled and finally thrown.RuntimeException convert(HibernateException e, LockOptions lockOptions)
handlePersistenceException(javax.persistence.PersistenceException) are also made.e - The Hibernate excepton.lockOptions - The lock options in effect at the time of exception (can be null)RuntimeException convert(HibernateException e)
handlePersistenceException(javax.persistence.PersistenceException) are also made.e - The Hibernate excepton.void throwPersistenceException(HibernateException e)
convert(org.hibernate.HibernateException, org.hibernate.LockOptions) and then throws the given exception.e - The exception being handled and finally thrown.PersistenceException wrapStaleStateException(StaleStateException e)
LockOptions getLockRequest(LockModeType lockModeType, Map<String,Object> properties)
LockModeType & properties into LockOptionslockModeType - is the requested lock typeproperties - are the lock properties<T> TypedQuery<T> createQuery(String jpaqlString, Class<T> resultClass, Selection selection, HibernateEntityManagerImplementor.Options options)
T - The query typejpaqlString - The criteria query rendered as a JPA QL stringresultClass - The result type (the type expected in the result list)selection - The selection(s)options - The options to use to build the query.Copyright © 2012 JBoss by Red Hat. All Rights Reserved.