Class ScopedBeanInterceptor
- java.lang.Object
- org.hibernate.EmptyInterceptor
- org.springframework.orm.hibernate3.support.ScopedBeanInterceptor
- All Implemented Interfaces:
Serializable
,Interceptor
@Deprecated public class ScopedBeanInterceptor extends EmptyInterceptor
Deprecated.as of Spring 4.3, in favor of Hibernate 4.x/5.xHibernate3 interceptor used for getting the proper entity name for scoped beans. As scoped bean classes are proxies generated at runtime, they are unrecognized by the persisting framework. Using this interceptor, the original scoped bean class is retrieved end exposed to Hibernate for persisting.Usage example:
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> ... <property name="entityInterceptor"> <bean class="org.springframework.orm.hibernate3.support.ScopedBeanInterceptor"/> </property> </bean>
- Since:
- 2.0
- Author:
- Costin Leau, Juergen Hoeller
- See Also:
- Serialized Form
Field Summary
Fields inherited from class org.hibernate.EmptyInterceptor
INSTANCE
Constructor Summary
Constructors Constructor Description ScopedBeanInterceptor()
Deprecated.
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
getEntityName(Object entity)
Deprecated.Methods inherited from class org.hibernate.EmptyInterceptor
afterTransactionBegin, afterTransactionCompletion, beforeTransactionCompletion, findDirty, getEntity, instantiate, isTransient, onCollectionRecreate, onCollectionRemove, onCollectionUpdate, onDelete, onFlushDirty, onLoad, onPrepareStatement, onSave, postFlush, preFlush
Constructor Detail
ScopedBeanInterceptor
public ScopedBeanInterceptor()
Deprecated.
Method Detail
getEntityName
public String getEntityName(Object entity)
Deprecated.- Specified by:
getEntityName
in interfaceInterceptor
- Overrides:
getEntityName
in classEmptyInterceptor