1 package org.hibernate.event; 3 4 5 6 11 public class PersistEvent extends AbstractEvent { 12 13 private Object object; 14 private String entityName; 15 16 public PersistEvent(String entityName, Object original, EventSource source) { 17 this(original, source); 18 this.entityName = entityName; 19 } 20 21 public PersistEvent(Object object, EventSource source) { 22 super(source); 23 if ( object == null ) { 24 throw new IllegalArgumentException ( 25 "attempt to create create event with null entity" 26 ); 27 } 28 this.object = object; 29 } 30 31 public Object getObject() { 32 return object; 33 } 34 35 public void setObject(Object object) { 36 this.object = object; 37 } 38 39 public String getEntityName() { 40 return entityName; 41 } 42 43 public void setEntityName(String entityName) { 44 this.entityName = entityName; 45 } 46 47 } 48 | Popular Tags |