1 27 package org.objectweb.jonas_ejb.deployment.xml; 28 29 import org.objectweb.jonas_lib.deployment.xml.AbsElement; 30 35 36 public class Query extends AbsElement { 37 38 41 private String description = null; 42 43 46 private QueryMethod queryMethod = null; 47 48 51 private String resultTypeMapping = null; 52 53 56 private String ejbQl = null; 57 58 59 62 public Query() { 63 super(); 64 } 65 66 70 public String getDescription() { 71 return description; 72 } 73 74 78 public void setDescription(String description) { 79 this.description = description; 80 } 81 82 86 public QueryMethod getQueryMethod() { 87 return queryMethod; 88 } 89 90 94 public void setQueryMethod(QueryMethod queryMethod) { 95 this.queryMethod = queryMethod; 96 } 97 98 102 public String getResultTypeMapping() { 103 return resultTypeMapping; 104 } 105 106 110 public void setResultTypeMapping(String resultTypeMapping) { 111 this.resultTypeMapping = resultTypeMapping; 112 } 113 114 118 public String getEjbQl() { 119 return ejbQl; 120 } 121 122 126 public void setEjbQl(String ejbQl) { 127 this.ejbQl = ejbQl; 128 } 129 130 135 public String toXML(int indent) { 136 StringBuffer sb = new StringBuffer (); 137 sb.append(indent(indent)); 138 sb.append("<query>\n"); 139 140 indent += 2; 141 142 sb.append(xmlElement(description, "description", indent)); 144 if (queryMethod != null) { 146 sb.append(queryMethod.toXML(indent)); 147 } 148 sb.append(xmlElement(resultTypeMapping, "result-type-mapping", indent)); 150 sb.append(xmlElement(ejbQl, "ejb-ql", indent)); 152 indent -= 2; 153 sb.append(indent(indent)); 154 sb.append("</query>\n"); 155 156 return sb.toString(); 157 } 158 } 159 | Popular Tags |