1 56 package org.objectstyle.cayenne.map.event; 57 58 import org.objectstyle.cayenne.map.DataMap; 59 60 63 public class DataMapEvent extends MapEvent { 64 protected DataMap dataMap; 65 66 67 public DataMapEvent(Object src, DataMap dataMap) { 68 super(src); 69 this.dataMap = dataMap; 70 } 71 72 73 public DataMapEvent(Object src, DataMap dataMap, int id) { 74 this(src, dataMap); 75 setId(id); 76 } 77 78 79 public DataMapEvent(Object src, DataMap dataMap, String oldName) { 80 this(src, dataMap); 81 setOldName(oldName); 82 } 83 84 87 public DataMap getDataMap() { 88 return dataMap; 89 } 90 91 96 public void setDataMap(DataMap dataMap) { 97 this.dataMap = dataMap; 98 } 99 100 public String getNewName() { 101 return (dataMap != null) ? dataMap.getName() : null; 102 } 103 } | Popular Tags |