1 56 package org.objectstyle.cayenne.map.event; 57 58 import org.objectstyle.cayenne.access.DataDomain; 59 60 67 public class DomainEvent extends MapEvent { 68 protected DataDomain domain; 69 70 71 public DomainEvent(Object src, DataDomain domain) { 72 super(src); 73 this.domain = domain; 74 } 75 76 77 public DomainEvent(Object src, DataDomain domain, int id) { 78 this(src, domain); 79 setId(id); 80 } 81 82 83 public DomainEvent(Object src, DataDomain domain, String oldName) { 84 this(src, domain); 85 setOldName(oldName); 86 } 87 88 89 public DataDomain getDomain() { 90 return domain; 91 } 92 93 98 public void setDomain(DataDomain domain) { 99 this.domain = domain; 100 } 101 102 public String getNewName() { 103 return (domain != null) ? domain.getName() : null; 104 } 105 } | Popular Tags |