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