1 27 package org.objectweb.jonas_ejb.deployment.xml; 28 29 import org.objectweb.jonas_lib.deployment.xml.AbsElement; 30 35 36 public class QueryMethod extends AbsElement { 37 38 41 private String methodName = null; 42 43 46 private MethodParams methodParams = null; 47 48 49 52 public QueryMethod() { 53 super(); 54 } 55 56 60 public String getMethodName() { 61 return methodName; 62 } 63 64 68 public void setMethodName(String methodName) { 69 this.methodName = methodName; 70 } 71 72 76 public MethodParams getMethodParams() { 77 return methodParams; 78 } 79 80 84 public void setMethodParams(MethodParams methodParams) { 85 this.methodParams = methodParams; 86 } 87 88 93 public String toXML(int indent) { 94 StringBuffer sb = new StringBuffer (); 95 sb.append(indent(indent)); 96 sb.append("<query-method>\n"); 97 98 indent += 2; 99 100 sb.append(xmlElement(methodName, "method-name", indent)); 102 if (methodParams != null) { 104 sb.append(methodParams.toXML(indent)); 105 } 106 indent -= 2; 107 sb.append(indent(indent)); 108 sb.append("</query-method>\n"); 109 110 return sb.toString(); 111 } 112 } 113 | Popular Tags |