Package org.apache.openjpa.persistence
Class PersistenceExceptions
- java.lang.Object
 - 
- org.apache.openjpa.util.Exceptions
 - 
- org.apache.openjpa.persistence.PersistenceExceptions
 
 
 
- 
public class PersistenceExceptions extends Exceptions
Converts from OpenJPA to persistence exception types.- Author:
 - Abe White, Marc Prud'hommeaux
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static RuntimeExceptionTranslatorTRANSLATOR- 
Fields inherited from class org.apache.openjpa.util.Exceptions
EMPTY_THROWABLES 
 - 
 
- 
Constructor Summary
Constructors Constructor Description PersistenceExceptions() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RuntimeExceptionTranslatorgetRollbackTranslator(OpenJPAEntityManager em)Returns aRuntimeExceptionTranslatorthat will perform the correct exception translation as well as roll back the current transaction when for all butNoResultExceptionandNonUniqueResultExceptionin accordance with section 3.7 of the EJB 3.0 specification.static RuntimeExceptiontoPersistenceException(Throwable t)Convert the given throwable to the proper persistence exception.- 
Methods inherited from class org.apache.openjpa.util.Exceptions
printNestedThrowables, printNestedThrowables, replaceFailedObject, replaceNestedThrowables, toClassName, toClassNames, toString, toString, toString 
 - 
 
 - 
 
- 
- 
Field Detail
- 
TRANSLATOR
public static final RuntimeExceptionTranslator TRANSLATOR
 
 - 
 
- 
Method Detail
- 
getRollbackTranslator
public static RuntimeExceptionTranslator getRollbackTranslator(OpenJPAEntityManager em)
Returns aRuntimeExceptionTranslatorthat will perform the correct exception translation as well as roll back the current transaction when for all butNoResultExceptionandNonUniqueResultExceptionin accordance with section 3.7 of the EJB 3.0 specification. 
- 
toPersistenceException
public static RuntimeException toPersistenceException(Throwable t)
Convert the given throwable to the proper persistence exception. 
 - 
 
 -