java.lang.Object
org.hibernate.EmptyInterceptor
org.hibernate.test.dynamicentity.interceptor.ProxyInterceptor
- All Implemented Interfaces:
- org.hibernate.Interceptor, java.io.Serializable
- public class ProxyInterceptor
- extends org.hibernate.EmptyInterceptor
Our custom org.hibernate.Interceptor impl which performs the
interpretation of entity-name -> proxy instance and vice-versa.
Methods inherited from class org.hibernate.EmptyInterceptor |
afterTransactionBegin, afterTransactionCompletion, beforeTransactionCompletion, findDirty, getEntity, 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 |
ProxyInterceptor
public ProxyInterceptor()
getEntityName
public java.lang.String getEntityName(java.lang.Object object)
- The callback from Hibernate to determine the entity name given
a presumed entity instance.
instantiate
public java.lang.Object instantiate(java.lang.String entityName,
org.hibernate.EntityMode entityMode,
java.io.Serializable id)
- The callback from Hibernate in order to build an instance of the
entity represented by the given entity name. Here, we build a
java.lang.reflect.Proxy representing the entity.