spring-framework / org.springframework.dao.support / ChainedPersistenceExceptionTranslator

ChainedPersistenceExceptionTranslator

open class ChainedPersistenceExceptionTranslator : PersistenceExceptionTranslator

Implementation of PersistenceExceptionTranslator that supports chaining, allowing the addition of PersistenceExceptionTranslator instances in order. Returns non-null on the first (if any) match.

Author
Rod Johnson

Author
Juergen Hoeller

Since
2.0

Constructors

<init>

ChainedPersistenceExceptionTranslator()

Implementation of PersistenceExceptionTranslator that supports chaining, allowing the addition of PersistenceExceptionTranslator instances in order. Returns non-null on the first (if any) match.

Functions

addDelegate

fun addDelegate(pet: PersistenceExceptionTranslator): Unit

Add a PersistenceExceptionTranslator to the chained delegate list.

getDelegates

fun getDelegates(): Array<PersistenceExceptionTranslator>

Return all registered PersistenceExceptionTranslator delegates (as array).

translateExceptionIfPossible

open fun translateExceptionIfPossible(ex: RuntimeException): DataAccessException