public class EmptyInterceptor extends Object implements Interceptor, Serializable
| Modifier and Type | Field and Description |
|---|---|
static Interceptor |
INSTANCE |
| Modifier | Constructor and Description |
|---|---|
protected |
EmptyInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterTransactionBegin(Transaction tx)
Called when a Hibernate transaction is begun via the Hibernate Transaction
API.
|
void |
afterTransactionCompletion(Transaction tx)
Called after a transaction is committed or rolled back.
|
void |
beforeTransactionCompletion(Transaction tx)
Called before a transaction is committed (but not before rollback).
|
int[] |
findDirty(Object entity,
Serializable id,
Object[] currentState,
Object[] previousState,
String[] propertyNames,
Type[] types)
Called from flush().
|
Object |
getEntity(String entityName,
Serializable id)
Get a fully loaded entity instance that is cached externally
|
String |
getEntityName(Object object)
Get the entity name for a persistent or transient instance
|
Object |
instantiate(String entityName,
EntityMode entityMode,
Serializable id)
Instantiate the entity class.
|
Boolean |
isTransient(Object entity)
Called to distinguish between transient and detached entities.
|
void |
onCollectionRecreate(Object collection,
Serializable key)
Called before a collection is (re)created.
|
void |
onCollectionRemove(Object collection,
Serializable key)
Called before a collection is deleted.
|
void |
onCollectionUpdate(Object collection,
Serializable key)
Called before a collection is updated.
|
void |
onDelete(Object entity,
Serializable id,
Object[] state,
String[] propertyNames,
Type[] types)
Called before an object is deleted.
|
boolean |
onFlushDirty(Object entity,
Serializable id,
Object[] currentState,
Object[] previousState,
String[] propertyNames,
Type[] types)
Called when an object is detected to be dirty, during a flush.
|
boolean |
onLoad(Object entity,
Serializable id,
Object[] state,
String[] propertyNames,
Type[] types)
Called just before an object is initialized.
|
String |
onPrepareStatement(String sql)
Called when sql string is being prepared.
|
boolean |
onSave(Object entity,
Serializable id,
Object[] state,
String[] propertyNames,
Type[] types)
Called before an object is saved.
|
void |
postFlush(Iterator entities)
Called after a flush that actually ends in execution of the SQL statements required to synchronize
in-memory state with the database.
|
void |
preFlush(Iterator entities)
Called before a flush
|
public static final Interceptor INSTANCE
public void onDelete(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types)
InterceptoronDelete in interface Interceptorpublic boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types)
InterceptoronFlushDirty in interface Interceptorpublic boolean onLoad(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types)
InterceptoronLoad in interface Interceptorpublic boolean onSave(Object entity, Serializable id, Object[] state, String[] propertyNames, Type[] types)
InterceptoronSave in interface Interceptorpublic void postFlush(Iterator entities)
InterceptorpostFlush in interface Interceptorpublic void preFlush(Iterator entities)
InterceptorpreFlush in interface Interceptorpublic Boolean isTransient(Object entity)
InterceptorisTransient in interface Interceptorentity - a transient or detached entitypublic Object instantiate(String entityName, EntityMode entityMode, Serializable id)
Interceptorinstantiate in interface InterceptorentityName - the name of the entityentityMode - The type of entity instance to be returned.id - the identifier of the new instancepublic int[] findDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, Type[] types)
InterceptorfindDirty in interface Interceptorentity - a persistent entitypublic String getEntityName(Object object)
InterceptorgetEntityName in interface Interceptorobject - an entity instancepublic Object getEntity(String entityName, Serializable id)
InterceptorgetEntity in interface InterceptorentityName - the name of the entityid - the instance identifierpublic void afterTransactionBegin(Transaction tx)
InterceptorafterTransactionBegin in interface Interceptorpublic void afterTransactionCompletion(Transaction tx)
InterceptorafterTransactionCompletion in interface Interceptorpublic void beforeTransactionCompletion(Transaction tx)
InterceptorbeforeTransactionCompletion in interface Interceptorpublic String onPrepareStatement(String sql)
InterceptoronPrepareStatement in interface Interceptorsql - sql to be preparedpublic void onCollectionRemove(Object collection, Serializable key) throws CallbackException
InterceptoronCollectionRemove in interface InterceptorCallbackExceptionpublic void onCollectionRecreate(Object collection, Serializable key) throws CallbackException
InterceptoronCollectionRecreate in interface InterceptorCallbackExceptionpublic void onCollectionUpdate(Object collection, Serializable key) throws CallbackException
InterceptoronCollectionUpdate in interface InterceptorCallbackExceptionCopyright © 2002-2017 Red Hat Middleware, LLC. All Rights Reserved