|
|||||||||||||||||||
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
QueryWrapper.java | - | 0% | 0% | 0% |
|
1 |
/*
|
|
2 |
* Joey and its relative products are published under the terms
|
|
3 |
* of the Apache Software License.
|
|
4 |
*/
|
|
5 |
/*
|
|
6 |
* Created on 2004/02/29
|
|
7 |
*/
|
|
8 |
package org.asyrinx.brownie.hibernate.wrapper;
|
|
9 |
|
|
10 |
import java.io.Serializable;
|
|
11 |
import java.math.BigDecimal;
|
|
12 |
import java.util.Calendar;
|
|
13 |
import java.util.Collection;
|
|
14 |
import java.util.Date;
|
|
15 |
import java.util.Iterator;
|
|
16 |
import java.util.List;
|
|
17 |
import java.util.Locale;
|
|
18 |
|
|
19 |
import net.sf.hibernate.HibernateException;
|
|
20 |
import net.sf.hibernate.LockMode;
|
|
21 |
import net.sf.hibernate.MappingException;
|
|
22 |
import net.sf.hibernate.Query;
|
|
23 |
import net.sf.hibernate.ScrollableResults;
|
|
24 |
import net.sf.hibernate.type.Type;
|
|
25 |
|
|
26 |
/**
|
|
27 |
* @author akima
|
|
28 |
*/
|
|
29 |
public class QueryWrapper implements Query { |
|
30 |
|
|
31 |
/**
|
|
32 |
*
|
|
33 |
*/
|
|
34 | 0 |
public QueryWrapper(Query wrapped) {
|
35 | 0 |
super();
|
36 | 0 |
this.wrapped = wrapped;
|
37 |
} |
|
38 |
|
|
39 |
protected final Query wrapped;
|
|
40 |
|
|
41 |
/**
|
|
42 |
* @return @throws
|
|
43 |
* net.sf.hibernate.HibernateException
|
|
44 |
*/
|
|
45 | 0 |
public String[] getNamedParameters() throws HibernateException { |
46 | 0 |
return wrapped.getNamedParameters();
|
47 |
} |
|
48 |
|
|
49 |
/**
|
|
50 |
* @return
|
|
51 |
*/
|
|
52 | 0 |
public String getQueryString() {
|
53 | 0 |
return wrapped.getQueryString();
|
54 |
} |
|
55 |
|
|
56 |
/**
|
|
57 |
* @return @throws
|
|
58 |
* net.sf.hibernate.HibernateException
|
|
59 |
*/
|
|
60 | 0 |
public Type[] getReturnTypes() throws HibernateException { |
61 | 0 |
return wrapped.getReturnTypes();
|
62 |
} |
|
63 |
|
|
64 |
/**
|
|
65 |
* @return @throws
|
|
66 |
* net.sf.hibernate.HibernateException
|
|
67 |
*/
|
|
68 | 0 |
public Iterator iterate() throws HibernateException { |
69 | 0 |
return wrapped.iterate();
|
70 |
} |
|
71 |
|
|
72 |
/**
|
|
73 |
* @return @throws
|
|
74 |
* net.sf.hibernate.HibernateException
|
|
75 |
*/
|
|
76 | 0 |
public List list() throws HibernateException { |
77 | 0 |
return wrapped.list();
|
78 |
} |
|
79 |
|
|
80 |
/**
|
|
81 |
* @return @throws
|
|
82 |
* net.sf.hibernate.HibernateException
|
|
83 |
*/
|
|
84 | 0 |
public ScrollableResults scroll() throws HibernateException { |
85 | 0 |
return wrapped.scroll();
|
86 |
} |
|
87 |
|
|
88 |
/**
|
|
89 |
* @param position
|
|
90 |
* @param number
|
|
91 |
* @return
|
|
92 |
*/
|
|
93 | 0 |
public Query setBigDecimal(int position, BigDecimal number) { |
94 | 0 |
return wrapped.setBigDecimal(position, number);
|
95 |
} |
|
96 |
|
|
97 |
/**
|
|
98 |
* @param name
|
|
99 |
* @param number
|
|
100 |
* @return
|
|
101 |
*/
|
|
102 | 0 |
public Query setBigDecimal(String name, BigDecimal number) {
|
103 | 0 |
return wrapped.setBigDecimal(name, number);
|
104 |
} |
|
105 |
|
|
106 |
/**
|
|
107 |
* @param position
|
|
108 |
* @param val
|
|
109 |
* @return
|
|
110 |
*/
|
|
111 | 0 |
public Query setBinary(int position, byte[] val) { |
112 | 0 |
return wrapped.setBinary(position, val);
|
113 |
} |
|
114 |
|
|
115 |
/**
|
|
116 |
* @param name
|
|
117 |
* @param val
|
|
118 |
* @return
|
|
119 |
*/
|
|
120 | 0 |
public Query setBinary(String name, byte[] val) { |
121 | 0 |
return wrapped.setBinary(name, val);
|
122 |
} |
|
123 |
|
|
124 |
/**
|
|
125 |
* @param position
|
|
126 |
* @param val
|
|
127 |
* @return
|
|
128 |
*/
|
|
129 | 0 |
public Query setBoolean(int position, boolean val) { |
130 | 0 |
return wrapped.setBoolean(position, val);
|
131 |
} |
|
132 |
|
|
133 |
/**
|
|
134 |
* @param name
|
|
135 |
* @param val
|
|
136 |
* @return
|
|
137 |
*/
|
|
138 | 0 |
public Query setBoolean(String name, boolean val) { |
139 | 0 |
return wrapped.setBoolean(name, val);
|
140 |
} |
|
141 |
|
|
142 |
/**
|
|
143 |
* @param position
|
|
144 |
* @param val
|
|
145 |
* @return
|
|
146 |
*/
|
|
147 | 0 |
public Query setByte(int position, byte val) { |
148 | 0 |
return wrapped.setByte(position, val);
|
149 |
} |
|
150 |
|
|
151 |
/**
|
|
152 |
* @param name
|
|
153 |
* @param val
|
|
154 |
* @return
|
|
155 |
*/
|
|
156 | 0 |
public Query setByte(String name, byte val) { |
157 | 0 |
return wrapped.setByte(name, val);
|
158 |
} |
|
159 |
|
|
160 |
/**
|
|
161 |
* @param cacheable
|
|
162 |
* @return
|
|
163 |
*/
|
|
164 | 0 |
public Query setCacheable(boolean cacheable) { |
165 | 0 |
return wrapped.setCacheable(cacheable);
|
166 |
} |
|
167 |
|
|
168 |
/**
|
|
169 |
* @param cacheRegion
|
|
170 |
* @return
|
|
171 |
*/
|
|
172 | 0 |
public Query setCacheRegion(String cacheRegion) {
|
173 | 0 |
return wrapped.setCacheRegion(cacheRegion);
|
174 |
} |
|
175 |
|
|
176 |
/**
|
|
177 |
* @param position
|
|
178 |
* @param calendar
|
|
179 |
* @return
|
|
180 |
*/
|
|
181 | 0 |
public Query setCalendar(int position, Calendar calendar) { |
182 | 0 |
return wrapped.setCalendar(position, calendar);
|
183 |
} |
|
184 |
|
|
185 |
/**
|
|
186 |
* @param name
|
|
187 |
* @param calendar
|
|
188 |
* @return
|
|
189 |
*/
|
|
190 | 0 |
public Query setCalendar(String name, Calendar calendar) {
|
191 | 0 |
return wrapped.setCalendar(name, calendar);
|
192 |
} |
|
193 |
|
|
194 |
/**
|
|
195 |
* @param position
|
|
196 |
* @param calendar
|
|
197 |
* @return
|
|
198 |
*/
|
|
199 | 0 |
public Query setCalendarDate(int position, Calendar calendar) { |
200 | 0 |
return wrapped.setCalendarDate(position, calendar);
|
201 |
} |
|
202 |
|
|
203 |
/**
|
|
204 |
* @param name
|
|
205 |
* @param calendar
|
|
206 |
* @return
|
|
207 |
*/
|
|
208 | 0 |
public Query setCalendarDate(String name, Calendar calendar) {
|
209 | 0 |
return wrapped.setCalendarDate(name, calendar);
|
210 |
} |
|
211 |
|
|
212 |
/**
|
|
213 |
* @param position
|
|
214 |
* @param val
|
|
215 |
* @return
|
|
216 |
*/
|
|
217 | 0 |
public Query setCharacter(int position, char val) { |
218 | 0 |
return wrapped.setCharacter(position, val);
|
219 |
} |
|
220 |
|
|
221 |
/**
|
|
222 |
* @param name
|
|
223 |
* @param val
|
|
224 |
* @return
|
|
225 |
*/
|
|
226 | 0 |
public Query setCharacter(String name, char val) { |
227 | 0 |
return wrapped.setCharacter(name, val);
|
228 |
} |
|
229 |
|
|
230 |
/**
|
|
231 |
* @param position
|
|
232 |
* @param date
|
|
233 |
* @return
|
|
234 |
*/
|
|
235 | 0 |
public Query setDate(int position, Date date) { |
236 | 0 |
return wrapped.setDate(position, date);
|
237 |
} |
|
238 |
|
|
239 |
/**
|
|
240 |
* @param name
|
|
241 |
* @param date
|
|
242 |
* @return
|
|
243 |
*/
|
|
244 | 0 |
public Query setDate(String name, Date date) {
|
245 | 0 |
return wrapped.setDate(name, date);
|
246 |
} |
|
247 |
|
|
248 |
/**
|
|
249 |
* @param position
|
|
250 |
* @param val
|
|
251 |
* @return
|
|
252 |
*/
|
|
253 | 0 |
public Query setDouble(int position, double val) { |
254 | 0 |
return wrapped.setDouble(position, val);
|
255 |
} |
|
256 |
|
|
257 |
/**
|
|
258 |
* @param name
|
|
259 |
* @param val
|
|
260 |
* @return
|
|
261 |
*/
|
|
262 | 0 |
public Query setDouble(String name, double val) { |
263 | 0 |
return wrapped.setDouble(name, val);
|
264 |
} |
|
265 |
|
|
266 |
/**
|
|
267 |
* @param position
|
|
268 |
* @param val
|
|
269 |
* @return
|
|
270 |
*/
|
|
271 | 0 |
public Query setEntity(int position, Object val) { |
272 | 0 |
return wrapped.setEntity(position, val);
|
273 |
} |
|
274 |
|
|
275 |
/**
|
|
276 |
* @param name
|
|
277 |
* @param val
|
|
278 |
* @return
|
|
279 |
*/
|
|
280 | 0 |
public Query setEntity(String name, Object val) {
|
281 | 0 |
return wrapped.setEntity(name, val);
|
282 |
} |
|
283 |
|
|
284 |
/**
|
|
285 |
* @param position
|
|
286 |
* @param val
|
|
287 |
* @return @throws
|
|
288 |
* net.sf.hibernate.MappingException
|
|
289 |
* @deprecated
|
|
290 |
*/
|
|
291 | 0 |
public Query setEnum(int position, Object val) throws MappingException { |
292 | 0 |
return wrapped.setEnum(position, val);
|
293 |
} |
|
294 |
|
|
295 |
/**
|
|
296 |
* @param name
|
|
297 |
* @param val
|
|
298 |
* @return @throws
|
|
299 |
* net.sf.hibernate.MappingException
|
|
300 |
* @deprecated
|
|
301 |
*/
|
|
302 | 0 |
public Query setEnum(String name, Object val) throws MappingException { |
303 | 0 |
return wrapped.setEnum(name, val);
|
304 |
} |
|
305 |
|
|
306 |
/**
|
|
307 |
* @param firstResult
|
|
308 |
* @return
|
|
309 |
*/
|
|
310 | 0 |
public Query setFirstResult(int firstResult) { |
311 | 0 |
return wrapped.setFirstResult(firstResult);
|
312 |
} |
|
313 |
|
|
314 |
/**
|
|
315 |
* @param position
|
|
316 |
* @param val
|
|
317 |
* @return
|
|
318 |
*/
|
|
319 | 0 |
public Query setFloat(int position, float val) { |
320 | 0 |
return wrapped.setFloat(position, val);
|
321 |
} |
|
322 |
|
|
323 |
/**
|
|
324 |
* @param name
|
|
325 |
* @param val
|
|
326 |
* @return
|
|
327 |
*/
|
|
328 | 0 |
public Query setFloat(String name, float val) { |
329 | 0 |
return wrapped.setFloat(name, val);
|
330 |
} |
|
331 |
|
|
332 |
/**
|
|
333 |
* @param position
|
|
334 |
* @param val
|
|
335 |
* @return
|
|
336 |
*/
|
|
337 | 0 |
public Query setInteger(int position, int val) { |
338 | 0 |
return wrapped.setInteger(position, val);
|
339 |
} |
|
340 |
|
|
341 |
/**
|
|
342 |
* @param name
|
|
343 |
* @param val
|
|
344 |
* @return
|
|
345 |
*/
|
|
346 | 0 |
public Query setInteger(String name, int val) { |
347 | 0 |
return wrapped.setInteger(name, val);
|
348 |
} |
|
349 |
|
|
350 |
/**
|
|
351 |
* @param position
|
|
352 |
* @param locale
|
|
353 |
* @return
|
|
354 |
*/
|
|
355 | 0 |
public Query setLocale(int position, Locale locale) { |
356 | 0 |
return wrapped.setLocale(position, locale);
|
357 |
} |
|
358 |
|
|
359 |
/**
|
|
360 |
* @param name
|
|
361 |
* @param locale
|
|
362 |
* @return
|
|
363 |
*/
|
|
364 | 0 |
public Query setLocale(String name, Locale locale) {
|
365 | 0 |
return wrapped.setLocale(name, locale);
|
366 |
} |
|
367 |
|
|
368 |
/**
|
|
369 |
* @param alias
|
|
370 |
* @param lockMode
|
|
371 |
*/
|
|
372 | 0 |
public void setLockMode(String alias, LockMode lockMode) { |
373 | 0 |
wrapped.setLockMode(alias, lockMode); |
374 |
} |
|
375 |
|
|
376 |
/**
|
|
377 |
* @param position
|
|
378 |
* @param val
|
|
379 |
* @return
|
|
380 |
*/
|
|
381 | 0 |
public Query setLong(int position, long val) { |
382 | 0 |
return wrapped.setLong(position, val);
|
383 |
} |
|
384 |
|
|
385 |
/**
|
|
386 |
* @param name
|
|
387 |
* @param val
|
|
388 |
* @return
|
|
389 |
*/
|
|
390 | 0 |
public Query setLong(String name, long val) { |
391 | 0 |
return wrapped.setLong(name, val);
|
392 |
} |
|
393 |
|
|
394 |
/**
|
|
395 |
* @param maxResults
|
|
396 |
* @return
|
|
397 |
*/
|
|
398 | 0 |
public Query setMaxResults(int maxResults) { |
399 | 0 |
return wrapped.setMaxResults(maxResults);
|
400 |
} |
|
401 |
|
|
402 |
/**
|
|
403 |
* @param position
|
|
404 |
* @param val
|
|
405 |
* @return @throws
|
|
406 |
* net.sf.hibernate.HibernateException
|
|
407 |
*/
|
|
408 | 0 |
public Query setParameter(int position, Object val) |
409 |
throws HibernateException {
|
|
410 | 0 |
return wrapped.setParameter(position, val);
|
411 |
} |
|
412 |
|
|
413 |
/**
|
|
414 |
* @param position
|
|
415 |
* @param val
|
|
416 |
* @param type
|
|
417 |
* @return
|
|
418 |
*/
|
|
419 | 0 |
public Query setParameter(int position, Object val, Type type) { |
420 | 0 |
return wrapped.setParameter(position, val, type);
|
421 |
} |
|
422 |
|
|
423 |
/**
|
|
424 |
* @param name
|
|
425 |
* @param val
|
|
426 |
* @return @throws
|
|
427 |
* net.sf.hibernate.HibernateException
|
|
428 |
*/
|
|
429 | 0 |
public Query setParameter(String name, Object val)
|
430 |
throws HibernateException {
|
|
431 | 0 |
return wrapped.setParameter(name, val);
|
432 |
} |
|
433 |
|
|
434 |
/**
|
|
435 |
* @param name
|
|
436 |
* @param val
|
|
437 |
* @param type
|
|
438 |
* @return
|
|
439 |
*/
|
|
440 | 0 |
public Query setParameter(String name, Object val, Type type) {
|
441 | 0 |
return wrapped.setParameter(name, val, type);
|
442 |
} |
|
443 |
|
|
444 |
/**
|
|
445 |
* @param name
|
|
446 |
* @param vals
|
|
447 |
* @return @throws
|
|
448 |
* net.sf.hibernate.HibernateException
|
|
449 |
*/
|
|
450 | 0 |
public Query setParameterList(String name, Object[] vals)
|
451 |
throws HibernateException {
|
|
452 | 0 |
return wrapped.setParameterList(name, vals);
|
453 |
} |
|
454 |
|
|
455 |
/**
|
|
456 |
* @param name
|
|
457 |
* @param vals
|
|
458 |
* @param type
|
|
459 |
* @return @throws
|
|
460 |
* net.sf.hibernate.HibernateException
|
|
461 |
*/
|
|
462 | 0 |
public Query setParameterList(String name, Object[] vals, Type type)
|
463 |
throws HibernateException {
|
|
464 | 0 |
return wrapped.setParameterList(name, vals, type);
|
465 |
} |
|
466 |
|
|
467 |
/**
|
|
468 |
* @param name
|
|
469 |
* @param vals
|
|
470 |
* @return @throws
|
|
471 |
* net.sf.hibernate.HibernateException
|
|
472 |
*/
|
|
473 | 0 |
public Query setParameterList(String name, Collection vals)
|
474 |
throws HibernateException {
|
|
475 | 0 |
return wrapped.setParameterList(name, vals);
|
476 |
} |
|
477 |
|
|
478 |
/**
|
|
479 |
* @param name
|
|
480 |
* @param vals
|
|
481 |
* @param type
|
|
482 |
* @return @throws
|
|
483 |
* net.sf.hibernate.HibernateException
|
|
484 |
*/
|
|
485 | 0 |
public Query setParameterList(String name, Collection vals, Type type)
|
486 |
throws HibernateException {
|
|
487 | 0 |
return wrapped.setParameterList(name, vals, type);
|
488 |
} |
|
489 |
|
|
490 |
/**
|
|
491 |
* @param bean
|
|
492 |
* @return @throws
|
|
493 |
* net.sf.hibernate.HibernateException
|
|
494 |
*/
|
|
495 | 0 |
public Query setProperties(Object bean) throws HibernateException { |
496 | 0 |
return wrapped.setProperties(bean);
|
497 |
} |
|
498 |
|
|
499 |
/**
|
|
500 |
* @param position
|
|
501 |
* @param val
|
|
502 |
* @return
|
|
503 |
*/
|
|
504 | 0 |
public Query setSerializable(int position, Serializable val) { |
505 | 0 |
return wrapped.setSerializable(position, val);
|
506 |
} |
|
507 |
|
|
508 |
/**
|
|
509 |
* @param name
|
|
510 |
* @param val
|
|
511 |
* @return
|
|
512 |
*/
|
|
513 | 0 |
public Query setSerializable(String name, Serializable val) {
|
514 | 0 |
return wrapped.setSerializable(name, val);
|
515 |
} |
|
516 |
|
|
517 |
/**
|
|
518 |
* @param position
|
|
519 |
* @param val
|
|
520 |
* @return
|
|
521 |
*/
|
|
522 | 0 |
public Query setShort(int position, short val) { |
523 | 0 |
return wrapped.setShort(position, val);
|
524 |
} |
|
525 |
|
|
526 |
/**
|
|
527 |
* @param name
|
|
528 |
* @param val
|
|
529 |
* @return
|
|
530 |
*/
|
|
531 | 0 |
public Query setShort(String name, short val) { |
532 | 0 |
return wrapped.setShort(name, val);
|
533 |
} |
|
534 |
|
|
535 |
/**
|
|
536 |
* @param position
|
|
537 |
* @param val
|
|
538 |
* @return
|
|
539 |
*/
|
|
540 | 0 |
public Query setString(int position, String val) { |
541 | 0 |
return wrapped.setString(position, val);
|
542 |
} |
|
543 |
|
|
544 |
/**
|
|
545 |
* @param name
|
|
546 |
* @param val
|
|
547 |
* @return
|
|
548 |
*/
|
|
549 | 0 |
public Query setString(String name, String val) {
|
550 | 0 |
return wrapped.setString(name, val);
|
551 |
} |
|
552 |
|
|
553 |
/**
|
|
554 |
* @param position
|
|
555 |
* @param val
|
|
556 |
* @return
|
|
557 |
*/
|
|
558 | 0 |
public Query setText(int position, String val) { |
559 | 0 |
return wrapped.setText(position, val);
|
560 |
} |
|
561 |
|
|
562 |
/**
|
|
563 |
* @param name
|
|
564 |
* @param val
|
|
565 |
* @return
|
|
566 |
*/
|
|
567 | 0 |
public Query setText(String name, String val) {
|
568 | 0 |
return wrapped.setText(name, val);
|
569 |
} |
|
570 |
|
|
571 |
/**
|
|
572 |
* @param position
|
|
573 |
* @param date
|
|
574 |
* @return
|
|
575 |
*/
|
|
576 | 0 |
public Query setTime(int position, Date date) { |
577 | 0 |
return wrapped.setTime(position, date);
|
578 |
} |
|
579 |
|
|
580 |
/**
|
|
581 |
* @param name
|
|
582 |
* @param date
|
|
583 |
* @return
|
|
584 |
*/
|
|
585 | 0 |
public Query setTime(String name, Date date) {
|
586 | 0 |
return wrapped.setTime(name, date);
|
587 |
} |
|
588 |
|
|
589 |
/**
|
|
590 |
* @param timeout
|
|
591 |
* @return
|
|
592 |
*/
|
|
593 | 0 |
public Query setTimeout(int timeout) { |
594 | 0 |
return wrapped.setTimeout(timeout);
|
595 |
} |
|
596 |
|
|
597 |
/**
|
|
598 |
* @param position
|
|
599 |
* @param date
|
|
600 |
* @return
|
|
601 |
*/
|
|
602 | 0 |
public Query setTimestamp(int position, Date date) { |
603 | 0 |
return wrapped.setTimestamp(position, date);
|
604 |
} |
|
605 |
|
|
606 |
/**
|
|
607 |
* @param name
|
|
608 |
* @param date
|
|
609 |
* @return
|
|
610 |
*/
|
|
611 | 0 |
public Query setTimestamp(String name, Date date) {
|
612 | 0 |
return wrapped.setTimestamp(name, date);
|
613 |
} |
|
614 |
|
|
615 |
/**
|
|
616 |
* @return @throws
|
|
617 |
* net.sf.hibernate.HibernateException
|
|
618 |
*/
|
|
619 | 0 |
public Object uniqueResult() throws HibernateException { |
620 | 0 |
return wrapped.uniqueResult();
|
621 |
} |
|
622 |
|
|
623 |
/**
|
|
624 |
* @param arg0
|
|
625 |
* @return
|
|
626 |
*/
|
|
627 | 0 |
public Query setFetchSize(int arg0) { |
628 | 0 |
return wrapped.setFetchSize(arg0);
|
629 |
} |
|
630 |
|
|
631 |
} |
|