Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

HibernateAccessor.EntityInterceptor Property

Gets or sets the entity interceptor that allows to inspect and change property values before writing to and reading from the database.

[Visual Basic]
Public MustOverride Property EntityInterceptor() As IInterceptor
   Public Get
   End Get
   Public Set
   End Set
End Property
public abstract IInterceptor EntityInterceptor { public get; public set; }

Property Value

The interceptor.


Will get applied to any new ISession created by this object.

Such an interceptor can either be set at the ISessionFactory level, i.e. on LocalSessionFactoryObject, or at the ISession level, i.e. on HibernateTemplate, HibernateInterceptor, and HibernateTransactionManager. It's preferable to set it on LocalSessionFactoryObject or HibernateTransactionManager to avoid repeated configuration and guarantee consistent behavior in transactions.

See Also

HibernateAccessor Class | Spring.Data.NHibernate Namespace