org.hibernate.test.interceptor
Class InstantiateInterceptor

java.lang.Object
  extended by org.hibernate.EmptyInterceptor
      extended by org.hibernate.test.interceptor.InstantiateInterceptor
All Implemented Interfaces:
Serializable, Interceptor

public class InstantiateInterceptor
extends EmptyInterceptor

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.hibernate.EmptyInterceptor
INSTANCE
 
Constructor Summary
InstantiateInterceptor(String injectedString)
           
 
Method Summary
 Object instantiate(String entityName, EntityMode entityMode, Serializable id)
          Instantiate the entity class.
 
Methods inherited from class org.hibernate.EmptyInterceptor
afterTransactionBegin, afterTransactionCompletion, beforeTransactionCompletion, findDirty, getEntity, getEntityName, 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

InstantiateInterceptor

public InstantiateInterceptor(String injectedString)
Method Detail

instantiate

public Object instantiate(String entityName,
                          EntityMode entityMode,
                          Serializable id)
                   throws CallbackException
Description copied from interface: Interceptor
Instantiate the entity class. Return null to indicate that Hibernate should use the default constructor of the class. The identifier property of the returned instance should be initialized with the given identifier.

Specified by:
instantiate in interface Interceptor
Overrides:
instantiate in class EmptyInterceptor
Parameters:
entityName - the name of the entity
entityMode - The type of entity instance to be returned.
id - the identifier of the new instance
Returns:
an instance of the class, or null to choose default behaviour
Throws:
CallbackException


Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.