C# Класс Spring.Dao.Support.PersistenceExceptionTranslationInterceptor

AOP MethodInterceptor that provides persistence exception translation based on a given PersistenceExceptionTranslator.
Delegates to the given IPersistenceExceptionTranslator to translate an Exception thrown into Spring's DataAccessException hierarchy (if appropriate).
Наследование: IMethodInterceptor, IObjectFactoryAware, IInitializingObject
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AfterPropertiesSet ( ) : void

Ensures that the property PersistenceExceptionTranslator has been set. Invoked by an Spring.Objects.Factory.IObjectFactory after it has injected all of an object's dependencies.

Invoke ( IMethodInvocation invocation ) : object

Return a translated exception if this is appropriate, otherwise rethrow the original exception.

PersistenceExceptionTranslationInterceptor ( ) : System

Initializes a new instance of the PersistenceExceptionTranslationInterceptor class. Needs to be configured with a PersistenceExceptionTranslator afterwards.

PersistenceExceptionTranslationInterceptor ( IListableObjectFactory objectFactory ) : System

Initializes a new instance of the PersistenceExceptionTranslationInterceptor class, autodetecting IPersistenceExceptionTranslators in the given object factory.

PersistenceExceptionTranslationInterceptor ( IPersistenceExceptionTranslator persistenceExceptionTranslator ) : System

Initializes a new instance of the PersistenceExceptionTranslationInterceptor class for the given IPersistenceExceptionTranslator

Защищенные методы

Метод Описание
DetectPersistenceExceptionTranslators ( IListableObjectFactory objectFactory ) : IPersistenceExceptionTranslator

Detects the petsistence exception translators in the given object factory.

Описание методов

AfterPropertiesSet() публичный Метод

Ensures that the property PersistenceExceptionTranslator has been set. Invoked by an Spring.Objects.Factory.IObjectFactory after it has injected all of an object's dependencies.
/// In the event of misconfiguration (such as the failure to set a /// required property) or if initialization fails. ///
public AfterPropertiesSet ( ) : void
Результат void

DetectPersistenceExceptionTranslators() защищенный Метод

Detects the petsistence exception translators in the given object factory.
protected DetectPersistenceExceptionTranslators ( IListableObjectFactory objectFactory ) : IPersistenceExceptionTranslator
objectFactory IListableObjectFactory The object factory for obtaining all IPersistenceExceptionTranslators.
Результат IPersistenceExceptionTranslator

Invoke() публичный Метод

Return a translated exception if this is appropriate, otherwise rethrow the original exception.
public Invoke ( IMethodInvocation invocation ) : object
invocation IMethodInvocation
Результат object

PersistenceExceptionTranslationInterceptor() публичный Метод

Initializes a new instance of the PersistenceExceptionTranslationInterceptor class. Needs to be configured with a PersistenceExceptionTranslator afterwards.
public PersistenceExceptionTranslationInterceptor ( ) : System
Результат System

PersistenceExceptionTranslationInterceptor() публичный Метод

Initializes a new instance of the PersistenceExceptionTranslationInterceptor class, autodetecting IPersistenceExceptionTranslators in the given object factory.
public PersistenceExceptionTranslationInterceptor ( IListableObjectFactory objectFactory ) : System
objectFactory IListableObjectFactory The object factory to obtain all IPersistenceExceptionTranslators from.
Результат System

PersistenceExceptionTranslationInterceptor() публичный Метод

Initializes a new instance of the PersistenceExceptionTranslationInterceptor class for the given IPersistenceExceptionTranslator
public PersistenceExceptionTranslationInterceptor ( IPersistenceExceptionTranslator persistenceExceptionTranslator ) : System
persistenceExceptionTranslator IPersistenceExceptionTranslator The persistence exception translator to use.
Результат System