1 package org.hibernate; 3 4 import java.io.Serializable ; 5 import java.util.Iterator ; 6 7 import org.hibernate.type.Type; 8 9 27 public interface Interceptor { 28 35 public boolean onLoad(Object entity, Serializable id, Object [] state, String [] propertyNames, Type[] types) throws CallbackException; 36 45 public boolean onFlushDirty(Object entity, Serializable id, Object [] currentState, Object [] previousState, String [] propertyNames, Type[] types) throws CallbackException; 46 52 public boolean onSave(Object entity, Serializable id, Object [] state, String [] propertyNames, Type[] types) throws CallbackException; 53 56 public void onDelete(Object entity, Serializable id, Object [] state, String [] propertyNames, Type[] types) throws CallbackException; 57 60 public void preFlush(Iterator entities) throws CallbackException; 61 65 public void postFlush(Iterator entities) throws CallbackException; 66 78 public Boolean isTransient(Object entity); 79 89 public int[] findDirty(Object entity, Serializable id, Object [] currentState, Object [] previousState, String [] propertyNames, Type[] types); 90 100 public Object instantiate(String entityName, EntityMode entityMode, Serializable id) throws CallbackException; 101 102 107 public String getEntityName(Object object) throws CallbackException; 108 109 116 public Object getEntity(String entityName, Serializable id) throws CallbackException; 117 118 123 public void afterTransactionBegin(Transaction tx); 124 127 public void beforeTransactionCompletion(Transaction tx); 128 131 public void afterTransactionCompletion(Transaction tx); 132 133 } 134 | Popular Tags |