当前页面:
在线文档首页 >
Spring Framework 2.0.5 API 文档英文版
ScopedBeanInterceptor (Spring Framework API 2.0) - Spring Framework 2.0.5 API 文档英文版
org.springframework.orm.hibernate3.support
Class ScopedBeanInterceptor
java.lang.Object
org.hibernate.EmptyInterceptor
org.springframework.orm.hibernate3.support.ScopedBeanInterceptor
- All Implemented Interfaces:
- Serializable, Interceptor
public class ScopedBeanInterceptor
- extends EmptyInterceptor
Hibernate3 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
Methods inherited from class org.hibernate.EmptyInterceptor |
afterTransactionBegin, afterTransactionCompletion, beforeTransactionCompletion, findDirty, getEntity, instantiate, isTransient, onCollectionRecreate, onCollectionRemove, onCollectionUpdate, onDelete, onFlushDirty, onLoad, onPrepareStatement, onSave, postFlush, preFlush |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ScopedBeanInterceptor
public ScopedBeanInterceptor()
getEntityName
public String getEntityName(Object entity)
- Specified by:
getEntityName
in interface Interceptor
- Overrides:
getEntityName
in class EmptyInterceptor
Copyright © 2002-2007 The Spring Framework.