Java Code Examples for org.springframework.orm.jpa.EntityManagerFactoryUtils#convertJpaAccessExceptionIfPossible()
The following examples show how to use
org.springframework.orm.jpa.EntityManagerFactoryUtils#convertJpaAccessExceptionIfPossible() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HibernateJpaDialect.java From spring-analysis-note with MIT License | 5 votes |
@Override @Nullable public DataAccessException translateExceptionIfPossible(RuntimeException ex) { if (ex instanceof HibernateException) { return convertHibernateAccessException((HibernateException) ex); } if (ex instanceof PersistenceException && ex.getCause() instanceof HibernateException) { return convertHibernateAccessException((HibernateException) ex.getCause()); } return EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(ex); }
Example 2
Source File: HibernateExceptionTranslator.java From spring-analysis-note with MIT License | 5 votes |
@Override @Nullable public DataAccessException translateExceptionIfPossible(RuntimeException ex) { if (ex instanceof HibernateException) { return convertHibernateAccessException((HibernateException) ex); } if (ex instanceof PersistenceException) { if (ex.getCause() instanceof HibernateException) { return convertHibernateAccessException((HibernateException) ex.getCause()); } return EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(ex); } return null; }
Example 3
Source File: HibernateJpaDialect.java From java-technology-stack with MIT License | 5 votes |
@Override @Nullable public DataAccessException translateExceptionIfPossible(RuntimeException ex) { if (ex instanceof HibernateException) { return convertHibernateAccessException((HibernateException) ex); } if (ex instanceof PersistenceException && ex.getCause() instanceof HibernateException) { return convertHibernateAccessException((HibernateException) ex.getCause()); } return EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(ex); }
Example 4
Source File: HibernateExceptionTranslator.java From java-technology-stack with MIT License | 5 votes |
@Override @Nullable public DataAccessException translateExceptionIfPossible(RuntimeException ex) { if (ex instanceof HibernateException) { return convertHibernateAccessException((HibernateException) ex); } if (ex instanceof PersistenceException) { if (ex.getCause() instanceof HibernateException) { return convertHibernateAccessException((HibernateException) ex.getCause()); } return EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(ex); } return null; }
Example 5
Source File: HibernateJpaDialect.java From lams with GNU General Public License v2.0 | 5 votes |
@Override public DataAccessException translateExceptionIfPossible(RuntimeException ex) { if (ex instanceof HibernateException) { return convertHibernateAccessException((HibernateException) ex); } if (ex instanceof PersistenceException && ex.getCause() instanceof HibernateException) { return convertHibernateAccessException((HibernateException) ex.getCause()); } return EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(ex); }
Example 6
Source File: HibernateExceptionTranslator.java From lams with GNU General Public License v2.0 | 5 votes |
@Override public DataAccessException translateExceptionIfPossible(RuntimeException ex) { if (ex instanceof HibernateException) { return convertHibernateAccessException((HibernateException) ex); } if (ex instanceof PersistenceException) { if (ex.getCause() instanceof HibernateException) { return convertHibernateAccessException((HibernateException) ex.getCause()); } return EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(ex); } return null; }
Example 7
Source File: HibernateJpaDialect.java From spring4-understanding with Apache License 2.0 | 5 votes |
@Override public DataAccessException translateExceptionIfPossible(RuntimeException ex) { if (ex instanceof HibernateException) { return convertHibernateAccessException((HibernateException) ex); } if (ex instanceof PersistenceException && ex.getCause() instanceof HibernateException) { return convertHibernateAccessException((HibernateException) ex.getCause()); } return EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(ex); }
Example 8
Source File: JpaPersistenceProvider.java From rice with Educational Community License v2.0 | 4 votes |
/** * {@inheritDoc} */ @Override public DataAccessException translateExceptionIfPossible(RuntimeException ex) { return EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(ex); }