Package org.hibernate
Class EmptyInterceptor
- java.lang.Object
-
- org.hibernate.EmptyInterceptor
-
- All Implemented Interfaces:
Serializable
,Interceptor
@Deprecated(since="6.0") public class EmptyInterceptor extends Object implements Interceptor, Serializable
Deprecated.implementInterceptor
directlyAn interceptor that does nothing. May be used as a base class for application-defined custom interceptors.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static Interceptor
INSTANCE
Deprecated.The singleton reference.
-
Constructor Summary
Constructors Modifier Constructor Description protected
EmptyInterceptor()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Object
instantiate(String entityName, RepresentationMode representationMode, Object id)
Deprecated.boolean
onSave(Object entity, Object id, Object[] state, String[] propertyNames, Type[] types)
Deprecated.Called before an object is saved.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.Interceptor
afterTransactionBegin, afterTransactionCompletion, beforeTransactionCompletion, findDirty, findDirty, getEntity, getEntity, getEntityName, instantiate, isTransient, onCollectionRecreate, onCollectionRecreate, onCollectionRemove, onCollectionRemove, onCollectionUpdate, onCollectionUpdate, onDelete, onDelete, onFlushDirty, onFlushDirty, onLoad, onLoad, onPrepareStatement, postFlush, preFlush
-
-
-
-
Field Detail
-
INSTANCE
public static final Interceptor INSTANCE
Deprecated.The singleton reference.
-
-
Method Detail
-
onSave
public boolean onSave(Object entity, Object id, Object[] state, String[] propertyNames, Type[] types) throws CallbackException
Deprecated.Description copied from interface:Interceptor
Called before an object is saved. The interceptor may modify thestate
, which will be used for the SQLINSERT
and propagated to the persistent object.- Specified by:
onSave
in interfaceInterceptor
- Parameters:
entity
- The entity instance whose state is being insertedid
- The identifier of the entitystate
- The state of the entity which will be insertedpropertyNames
- The names of the entity properties.types
- The types of the entity properties- Returns:
true
if the user modified thestate
in any way.- Throws:
CallbackException
- Thrown if the interceptor encounters any problems handling the callback.
-
instantiate
public Object instantiate(String entityName, RepresentationMode representationMode, Object id) throws CallbackException
Deprecated.- Specified by:
instantiate
in interfaceInterceptor
- Throws:
CallbackException
-
-