public class PersistenceExceptions extends Exceptions
Modifier and Type | Field and Description |
---|---|
static RuntimeExceptionTranslator |
TRANSLATOR |
EMPTY_THROWABLES
Constructor and Description |
---|
PersistenceExceptions() |
Modifier and Type | Method and Description |
---|---|
(package private) static java.lang.Throwable |
getCause(java.lang.Throwable[] nested)
Helper method to extract a nested exception from an internal nested
array in a safe way.
|
static RuntimeExceptionTranslator |
getRollbackTranslator(OpenJPAEntityManager em)
Returns a
RuntimeExceptionTranslator that will perform
the correct exception translation as well as roll back the
current transaction when for all but NoResultException
and NonUniqueResultException in accordance with
section 3.7 of the EJB 3.0 specification. |
static java.lang.RuntimeException |
toPersistenceException(java.lang.Throwable t)
Convert the given throwable to the proper persistence exception.
|
printNestedThrowables, printNestedThrowables, replaceFailedObject, replaceNestedThrowables, toClassName, toClassNames, toString, toString, toString
public static final RuntimeExceptionTranslator TRANSLATOR
public static RuntimeExceptionTranslator getRollbackTranslator(OpenJPAEntityManager em)
RuntimeExceptionTranslator
that will perform
the correct exception translation as well as roll back the
current transaction when for all but NoResultException
and NonUniqueResultException
in accordance with
section 3.7 of the EJB 3.0 specification.public static java.lang.RuntimeException toPersistenceException(java.lang.Throwable t)
static java.lang.Throwable getCause(java.lang.Throwable[] nested)
Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.