Query.java

00001 
00027 package org.objectweb.jonas_ejb.deployment.xml;
00028 
00029 import org.objectweb.jonas_lib.deployment.xml.AbsElement;
00036 public class Query extends AbsElement  {
00037 
00041     private String description = null;
00042 
00046     private QueryMethod queryMethod = null;
00047 
00051     private String resultTypeMapping = null;
00052 
00056     private String ejbQl = null;
00057 
00058 
00062     public Query() {
00063         super();
00064     }
00065 
00070     public String getDescription() {
00071         return description;
00072     }
00073 
00078     public void setDescription(String description) {
00079         this.description = description;
00080     }
00081 
00086     public QueryMethod getQueryMethod() {
00087         return queryMethod;
00088     }
00089 
00094     public void setQueryMethod(QueryMethod queryMethod) {
00095         this.queryMethod = queryMethod;
00096     }
00097 
00102     public String getResultTypeMapping() {
00103         return resultTypeMapping;
00104     }
00105 
00110     public void setResultTypeMapping(String resultTypeMapping) {
00111         this.resultTypeMapping = resultTypeMapping;
00112     }
00113 
00118     public String getEjbQl() {
00119         return ejbQl;
00120     }
00121 
00126     public void setEjbQl(String ejbQl) {
00127         this.ejbQl = ejbQl;
00128     }
00129 
00135     public String toXML(int indent) {
00136         StringBuffer sb = new StringBuffer();
00137         sb.append(indent(indent));
00138         sb.append("<query>\n");
00139 
00140         indent += 2;
00141 
00142         // description
00143         sb.append(xmlElement(description, "description", indent));
00144         // query-method
00145         if (queryMethod != null) {
00146             sb.append(queryMethod.toXML(indent));
00147         }
00148         // result-type-mapping
00149         sb.append(xmlElement(resultTypeMapping, "result-type-mapping", indent));
00150         // ejb-ql
00151         sb.append(xmlElement(ejbQl, "ejb-ql", indent));
00152         indent -= 2;
00153         sb.append(indent(indent));
00154         sb.append("</query>\n");
00155 
00156         return sb.toString();
00157     }
00158 }

Generated on Tue Feb 15 15:05:47 2005 for JOnAS by  doxygen 1.3.9.1