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
파일 보기 프로젝트 열기: spring-projects/spring-net 1 사용 예제들

공개 메소드들

메소드 설명
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