org.hibernate.test.interceptor
Class InstantiateInterceptor
java.lang.Object
org.hibernate.EmptyInterceptor
org.hibernate.test.interceptor.InstantiateInterceptor
- All Implemented Interfaces:
- Serializable, Interceptor
public class InstantiateInterceptor
- extends EmptyInterceptor
- See Also:
- Serialized Form
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 |
InstantiateInterceptor
public InstantiateInterceptor(String injectedString)
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 entityentityMode
- 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.