Interface PersistenceExceptionResolver

All Known Implementing Classes:
SQLErrorCodesResolver, SQLStateResolver

public interface PersistenceExceptionResolver
The PersistenceExceptionResolver is used to find out if an exception is caused by duplicate keys.
Since:
2.2
Author:
Martin Tilma
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Indicates whether the given exception represents a duplicate key violation.
  • Method Details

    • isDuplicateKeyViolation

      boolean isDuplicateKeyViolation(Exception exception)
      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.
      Parameters:
      exception - The exception to evaluate
      Returns:
      true if the given exception represents a Duplicate Key Violation, false otherwise.