1 package org.hibernate.event; 3 4 import org.hibernate.engine.EntityEntry; 5 6 9 public class FlushEntityEvent extends AbstractEvent { 10 11 private Object entity; 12 private Object [] propertyValues; 13 private Object [] databaseSnapshot; 14 private int[] dirtyProperties; 15 private boolean hasDirtyCollection; 16 private boolean dirtyCheckPossible; 17 private boolean dirtyCheckHandledByInterceptor; 18 private EntityEntry entityEntry; 19 20 public FlushEntityEvent(EventSource source, Object entity, EntityEntry entry) { 21 super(source); 22 this.entity = entity; 23 this.entityEntry = entry; 24 } 25 26 public EntityEntry getEntityEntry() { 27 return entityEntry; 28 } 29 public Object [] getDatabaseSnapshot() { 30 return databaseSnapshot; 31 } 32 public void setDatabaseSnapshot(Object [] databaseSnapshot) { 33 this.databaseSnapshot = databaseSnapshot; 34 } 35 public boolean hasDatabaseSnapshot() { 36 return databaseSnapshot!=null; 37 } 38 public boolean isDirtyCheckHandledByInterceptor() { 39 return dirtyCheckHandledByInterceptor; 40 } 41 public void setDirtyCheckHandledByInterceptor(boolean dirtyCheckHandledByInterceptor) { 42 this.dirtyCheckHandledByInterceptor = dirtyCheckHandledByInterceptor; 43 } 44 public boolean isDirtyCheckPossible() { 45 return dirtyCheckPossible; 46 } 47 public void setDirtyCheckPossible(boolean dirtyCheckPossible) { 48 this.dirtyCheckPossible = dirtyCheckPossible; 49 } 50 public int[] getDirtyProperties() { 51 return dirtyProperties; 52 } 53 public void setDirtyProperties(int[] dirtyProperties) { 54 this.dirtyProperties = dirtyProperties; 55 } 56 public boolean hasDirtyCollection() { 57 return hasDirtyCollection; 58 } 59 public void setHasDirtyCollection(boolean hasDirtyCollection) { 60 this.hasDirtyCollection = hasDirtyCollection; 61 } 62 public Object [] getPropertyValues() { 63 return propertyValues; 64 } 65 public void setPropertyValues(Object [] propertyValues) { 66 this.propertyValues = propertyValues; 67 } 68 public Object getEntity() { 69 return entity; 70 } 71 } 72 | Popular Tags |