1 package org.hibernate; 3 4 import java.io.Serializable ; 5 import java.util.Iterator ; 6 7 import org.hibernate.type.Type; 8 9 15 public class EmptyInterceptor implements Interceptor, Serializable { 16 17 public static final Interceptor INSTANCE = new EmptyInterceptor(); 18 19 protected EmptyInterceptor() {} 20 21 public void onDelete( 22 Object entity, 23 Serializable id, 24 Object [] state, 25 String [] propertyNames, 26 Type[] types) {} 27 28 public boolean onFlushDirty( 29 Object entity, 30 Serializable id, 31 Object [] currentState, 32 Object [] previousState, 33 String [] propertyNames, 34 Type[] types) { 35 return false; 36 } 37 38 public boolean onLoad( 39 Object entity, 40 Serializable id, 41 Object [] state, 42 String [] propertyNames, 43 Type[] types) { 44 return false; 45 } 46 47 public boolean onSave( 48 Object entity, 49 Serializable id, 50 Object [] state, 51 String [] propertyNames, 52 Type[] types) { 53 return false; 54 } 55 56 public void postFlush(Iterator entities) {} 57 public void preFlush(Iterator entities) {} 58 59 public Boolean isTransient(Object entity) { 60 return null; 61 } 62 63 public Object instantiate(String entityName, EntityMode entityMode, Serializable id) { 64 return null; 65 } 66 67 public int[] findDirty(Object entity, 68 Serializable id, 69 Object [] currentState, 70 Object [] previousState, 71 String [] propertyNames, 72 Type[] types) { 73 return null; 74 } 75 76 public String getEntityName(Object object) { 77 return null; 78 } 79 80 public Object getEntity(String entityName, Serializable id) { 81 return null; 82 } 83 84 public void afterTransactionBegin(Transaction tx) {} 85 public void afterTransactionCompletion(Transaction tx) {} 86 public void beforeTransactionCompletion(Transaction tx) {} 87 88 } | Popular Tags |