1 19 20 package org.apache.cayenne.map.event; 21 22 import org.apache.cayenne.map.Procedure; 23 24 30 public class ProcedureEvent extends MapEvent { 31 protected Procedure procedure; 32 33 public ProcedureEvent(Object source, Procedure procedure) { 34 super(source); 35 setProcedure(procedure); 36 } 37 38 public ProcedureEvent(Object source, Procedure procedure, String oldName) { 39 this(source, procedure); 40 setOldName(oldName); 41 } 42 43 public ProcedureEvent(Object source, Procedure procedure, int type) { 44 this(source, procedure); 45 setId(type); 46 } 47 48 public Procedure getProcedure() { 49 return procedure; 50 } 51 52 public void setProcedure(Procedure procedure) { 53 this.procedure = procedure; 54 } 55 56 public String getNewName() { 57 return (procedure != null) ? procedure.getName() : null; 58 } 59 } 60 | Popular Tags |