1 56 package org.objectstyle.cayenne.map.event; 57 58 import org.objectstyle.cayenne.map.Procedure; 59 60 66 public class ProcedureEvent extends MapEvent { 67 protected Procedure procedure; 68 69 public ProcedureEvent(Object source, Procedure procedure) { 70 super(source); 71 setProcedure(procedure); 72 } 73 74 public ProcedureEvent(Object source, Procedure procedure, String oldName) { 75 this(source, procedure); 76 setOldName(oldName); 77 } 78 79 public ProcedureEvent(Object source, Procedure procedure, int type) { 80 this(source, procedure); 81 setId(type); 82 } 83 84 public Procedure getProcedure() { 85 return procedure; 86 } 87 88 public void setProcedure(Procedure procedure) { 89 this.procedure = procedure; 90 } 91 92 public String getNewName() { 93 return (procedure != null) ? procedure.getName() : null; 94 } 95 } 96 | Popular Tags |