spring-framework / org.springframework.orm.hibernate5 / HibernateTransactionManager / setEntityInterceptorBeanName

setEntityInterceptorBeanName

open fun setEntityInterceptorBeanName(entityInterceptorBeanName: String): Unit

Set the bean name of a Hibernate entity interceptor that allows to inspect and change property values before writing to and reading from the database. Will get applied to any new Session created by this transaction manager.

Requires the bean factory to be known, to be able to resolve the bean name to an interceptor instance on session creation. Typically used for prototype interceptors, i.e. a new interceptor instance per session.

Can also be used for shared interceptor instances, but it is recommended to set the interceptor reference directly in such a scenario.

Parameters

entityInterceptorBeanName - the name of the entity interceptor in the bean factory

See Also
#setBeanFactory#setEntityInterceptor