public class DefaultJdbcOptimisticLockingExceptionMapper extends Object implements JdbcOptimisticLockingExceptionMapper
JdbcOptimisticLockingExceptionMapper which checks the caused exception (and its nested) whether any
of them is a constraint violation exception.
The following check is done:
SQLExceptionDataIntegrityViolationExceptionaddClassName(String) or
setClassNames(java.util.Set) methods. These class names is also matched. This allows to add vendor specific
exception classes.| Constructor and Description |
|---|
DefaultJdbcOptimisticLockingExceptionMapper() |
| Modifier and Type | Method and Description |
|---|---|
void |
addClassName(String name) |
static boolean |
isConstraintViolation(SQLException e) |
boolean |
isOptimisticLocking(Exception cause)
Checks the caused exception whether its to be considered as an
JdbcAggregationRepository.OptimisticLockingException. |
void |
setClassNames(Set<String> names) |
public DefaultJdbcOptimisticLockingExceptionMapper()
public boolean isOptimisticLocking(Exception cause)
JdbcOptimisticLockingExceptionMapperJdbcAggregationRepository.OptimisticLockingException.isOptimisticLocking in interface JdbcOptimisticLockingExceptionMappercause - the caused exceptionJdbcAggregationRepository.OptimisticLockingException.public static boolean isConstraintViolation(SQLException e)
public void addClassName(String name)
Apache Camel