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