org.axonframework.eventstore.jdbc
Class JdbcSQLErrorCodesResolver

java.lang.Object
  extended by org.axonframework.eventstore.jdbc.JdbcSQLErrorCodesResolver
All Implemented Interfaces:
PersistenceExceptionResolver

public class JdbcSQLErrorCodesResolver
extends Object
implements PersistenceExceptionResolver

SQLErrorCodesResolver is an implementation of PersistenceExceptionResolver used to resolve sql error codes to see if it is an duplicate key constraint violation.

Since:
2.2
Author:
Kristian Rosenvold

Constructor Summary
JdbcSQLErrorCodesResolver()
           
 
Method Summary
 boolean isDuplicateKeyViolation(Exception exception)
          Indicates whether the given exception represents a duplicate key violation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcSQLErrorCodesResolver

public JdbcSQLErrorCodesResolver()
Method Detail

isDuplicateKeyViolation

public boolean isDuplicateKeyViolation(Exception exception)
Description copied from interface: PersistenceExceptionResolver
Indicates whether the given exception represents a duplicate key violation. Typically, duplicate key violations indicates concurrent access to an entity in the application. Two users might be accessing the same Aggregate, for example.

Specified by:
isDuplicateKeyViolation in interface PersistenceExceptionResolver
Parameters:
exception - The exception to evaluate
Returns:
true if the given exception represents a Duplicate Key Violation, false otherwise.


Copyright © 2010-2016. All Rights Reserved.