1 19 20 package org.apache.cayenne.map.event; 21 22 import org.apache.cayenne.map.DataMap; 23 24 27 public class DataMapEvent extends MapEvent { 28 protected DataMap dataMap; 29 30 31 public DataMapEvent(Object src, DataMap dataMap) { 32 super(src); 33 this.dataMap = dataMap; 34 } 35 36 37 public DataMapEvent(Object src, DataMap dataMap, int id) { 38 this(src, dataMap); 39 setId(id); 40 } 41 42 43 public DataMapEvent(Object src, DataMap dataMap, String oldName) { 44 this(src, dataMap); 45 setOldName(oldName); 46 } 47 48 51 public DataMap getDataMap() { 52 return dataMap; 53 } 54 55 60 public void setDataMap(DataMap dataMap) { 61 this.dataMap = dataMap; 62 } 63 64 public String getNewName() { 65 return (dataMap != null) ? dataMap.getName() : null; 66 } 67 } 68 | Popular Tags |