1 23 24 25 26 31 32 package com.sun.jdo.spi.persistence.support.ejb.ejbqlc; 33 34 import java.util.Properties ; 35 import java.util.Map ; 36 import java.util.HashMap ; 37 import java.util.Iterator ; 38 import java.io.File ; 39 import java.io.FileInputStream ; 40 import java.io.BufferedInputStream ; 41 import java.io.IOException ; 42 import java.io.FileOutputStream ; 43 import java.io.BufferedOutputStream ; 44 45 51 public class JDOQLElements 52 { 53 54 private String candidateClassName; 55 56 57 private String parameters; 58 59 60 private String variables; 61 62 63 private String filter; 64 65 66 private String ordering; 67 68 69 private String result; 70 71 72 private String resultType; 73 74 75 private boolean isPCResult; 76 77 81 private boolean isAggregate; 82 83 84 private String [] parameterEjbNames; 85 86 89 public JDOQLElements(String candidateClassName, 90 String parameters, 91 String variables, 92 String filter, 93 String ordering, 94 String result, 95 String resultType, 96 boolean isPCResult, 97 boolean isAggregate, 98 String [] parameterEjbNames) 99 { 100 setCandidateClassName(candidateClassName); 101 setParameters(parameters); 102 setVariables(variables); 103 setFilter(filter); 104 setOrdering(ordering); 105 setResult(result); 106 setResultType(resultType); 107 setPCResult(isPCResult); 108 setAggregate(isAggregate); 109 setParameterEjbNames(parameterEjbNames); 110 } 111 112 113 public String getCandidateClassName() 114 { 115 return this.candidateClassName; 116 } 117 118 119 public void setCandidateClassName(String candidateClassName) 120 { 121 this.candidateClassName = candidateClassName; 123 } 124 125 126 public String getParameters() 127 { 128 return parameters; 129 } 130 131 132 public void setParameters(String parameters) 133 { 134 this.parameters = (parameters == null) ? "" : parameters; } 136 137 138 public String getVariables() 139 { 140 return variables; 141 } 142 143 144 public void setVariables(String variables) 145 { 146 this.variables = (variables == null) ? "" : variables; } 148 149 150 public String getFilter() 151 { 152 return filter; 153 } 154 155 156 public void setFilter(String filter) 157 { 158 this.filter = (filter == null) ? "" : filter; } 160 161 162 public String getOrdering() 163 { 164 return ordering; 165 } 166 167 168 public void setOrdering(String ordering) 169 { 170 this.ordering = (ordering == null) ? "" : ordering; } 172 173 174 public String getResult() 175 { 176 return result; 177 } 178 179 180 public void setResult(String result) 181 { 182 this.result = (result == null) ? "" : result; } 184 185 189 public String getResultType() 190 { 191 return resultType; 192 } 193 194 198 public void setResultType(String resultType) 199 { 200 this.resultType = resultType; 201 } 202 203 207 public boolean isPCResult() 208 { 209 return isPCResult; 210 } 211 212 216 public void setPCResult(boolean isPCResult) 217 { 218 this.isPCResult = isPCResult; 219 } 220 221 225 public boolean isAggregate() 226 { 227 return isAggregate; 228 } 229 230 234 public void setAggregate(boolean isAggregate) 235 { 236 this.isAggregate = isAggregate; 237 } 238 239 242 public String [] getParameterEjbNames() 243 { 244 return parameterEjbNames; 245 } 246 247 250 public void setParameterEjbNames(String [] parameterEjbNames) 251 { 252 this.parameterEjbNames = parameterEjbNames; 253 } 254 255 256 public String toString() 257 { 258 StringBuffer repr = new StringBuffer (); 259 repr.append("JDOQLElements("); repr.append("candidateClass: "); repr.append(candidateClassName); 262 if (parameters != null && parameters.length() > 0) { 263 repr.append(", parameters: "); repr.append(parameters); 265 } 266 if (variables != null && variables.length() > 0) { 267 repr.append(", variables: "); repr.append(variables); 269 } 270 if (filter != null && filter.length() > 0) { 271 repr.append(", filter: "); repr.append(filter); 273 } 274 if (ordering != null && ordering.length() > 0) { 275 repr.append(", ordering: "); repr.append(ordering); 277 } 278 if (result != null && result.length() > 0) { 279 repr.append(", result: "); repr.append(result); 281 repr.append(", resultType: "); repr.append(resultType); 283 repr.append(", isPCResult: "); repr.append(isPCResult); 285 } 286 repr.append(", isAggregate: "); 287 repr.append(isAggregate); 288 if (parameterEjbNames != null && parameterEjbNames.length > 0) { 289 repr.append(", parameterEjbNames: "); for (int i = 0; i < parameterEjbNames.length; i++) { 291 repr.append(i); 292 repr.append(": "); 293 repr.append(parameterEjbNames[i]); 294 repr.append(", "); 295 } 296 } 297 repr.append(")"); return repr.toString(); 299 } 300 } 301 | Popular Tags |