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