1 17 package org.apache.geronimo.naming.deployment.jsr88; 18 19 import org.apache.geronimo.xbeans.geronimo.naming.GerEjbLocalRefType; 20 21 32 public class EjbLocalRef extends HasPattern { 33 public EjbLocalRef() { 34 super(null); 35 } 36 37 public EjbLocalRef(GerEjbLocalRefType xmlObject) { 38 super(xmlObject); 39 } 40 41 public void setRefName(String name) { 42 String old = getEjbLocalRef().getRefName(); 43 getEjbLocalRef().setRefName(name); 44 pcs.firePropertyChange("refName", old, name); 45 } 46 47 public String getRefName() { 48 return getEjbLocalRef().getRefName(); 49 } 50 51 public String getEjbLink() { 52 return getEjbLocalRef().getEjbLink(); 53 } 54 55 public void setEjbLink(String link) { 56 GerEjbLocalRefType ref = getEjbLocalRef(); 57 if(link != null && ref.isSetPattern()) { 58 clearPatternFromChoice(); 59 } 60 String old = getEjbLink(); 61 ref.setEjbLink(link); 62 pcs.firePropertyChange("ejbLink", old, link); 63 } 64 65 66 protected void clearNonPatternFromChoice() { 67 GerEjbLocalRefType ref = getEjbLocalRef(); 68 if(ref.isSetEjbLink()) { 69 String temp = ref.getEjbLink(); 70 ref.unsetEjbLink(); 71 pcs.firePropertyChange("ejbLink", temp, null); 72 } 73 } 75 76 78 protected GerEjbLocalRefType getEjbLocalRef() { 79 return (GerEjbLocalRefType) getXmlObject(); 80 } 81 82 public void configure(GerEjbLocalRefType xml) { 83 setXmlObject(xml); 84 } 85 } 86 | Popular Tags |