1 19 20 package org.apache.cayenne.map.event; 21 22 import org.apache.cayenne.access.DataDomain; 23 24 31 public class DomainEvent extends MapEvent { 32 protected DataDomain domain; 33 34 35 public DomainEvent(Object src, DataDomain domain) { 36 super(src); 37 this.domain = domain; 38 } 39 40 41 public DomainEvent(Object src, DataDomain domain, int id) { 42 this(src, domain); 43 setId(id); 44 } 45 46 47 public DomainEvent(Object src, DataDomain domain, String oldName) { 48 this(src, domain); 49 setOldName(oldName); 50 } 51 52 53 public DataDomain getDomain() { 54 return domain; 55 } 56 57 62 public void setDomain(DataDomain domain) { 63 this.domain = domain; 64 } 65 66 public String getNewName() { 67 return (domain != null) ? domain.getName() : null; 68 } 69 } 70 | Popular Tags |