Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.hibernate.test.dynamicentity.interceptor
Class ProxyInterceptor  view ProxyInterceptor download ProxyInterceptor.java

java.lang.Object
  extended byorg.hibernate.EmptyInterceptor
      extended byorg.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.


Field Summary
 
Fields inherited from class org.hibernate.EmptyInterceptor
INSTANCE
 
Constructor Summary
ProxyInterceptor()
           
 
Method Summary
 java.lang.String getEntityName(java.lang.Object object)
          The callback from Hibernate to determine the entity name given a presumed entity instance.
 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.
 
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
 

Constructor Detail

ProxyInterceptor

public ProxyInterceptor()
Method Detail

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.