svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.expressionevaluator / org.gvsig.expressionevaluator.lib / org.gvsig.expressionevaluator.lib.api / src / main / java / org / gvsig / expressionevaluator / DelegatedExpressionBuilder.java @ 47320
History | View | Annotate | Download (16.5 KB)
1 |
package org.gvsig.expressionevaluator; |
---|---|
2 |
|
3 |
import java.awt.Color; |
4 |
import java.util.Date; |
5 |
import java.util.List; |
6 |
import java.util.Map; |
7 |
|
8 |
/**
|
9 |
*
|
10 |
* @author jjdelcerro
|
11 |
*/
|
12 |
public class DelegatedExpressionBuilder implements ExpressionBuilder { |
13 |
|
14 |
protected ExpressionBuilder delegate;
|
15 |
|
16 |
protected DelegatedExpressionBuilder(ExpressionBuilder delegate) {
|
17 |
this.delegate = delegate;
|
18 |
} |
19 |
|
20 |
@Override
|
21 |
public Formatter<Value> formatter() { |
22 |
return this.delegate.formatter(); |
23 |
} |
24 |
|
25 |
@Override
|
26 |
public String quote_for_identifiers() { |
27 |
return this.delegate.quote_for_identifiers(); |
28 |
} |
29 |
|
30 |
@Override
|
31 |
public String quote_for_strings() { |
32 |
return this.delegate.quote_for_strings(); |
33 |
} |
34 |
|
35 |
@Override
|
36 |
public void accept(Visitor visitor, VisitorFilter filter) { |
37 |
this.delegate.accept(visitor, filter);
|
38 |
} |
39 |
|
40 |
@Override
|
41 |
public List<Variable> variables() { |
42 |
return this.delegate.variables(); |
43 |
} |
44 |
|
45 |
@Override
|
46 |
public List<String> variables_names() { |
47 |
return this.delegate.parameters_names(); |
48 |
} |
49 |
|
50 |
@Override
|
51 |
public List<Parameter> parameters() { |
52 |
return this.delegate.parameters(); |
53 |
} |
54 |
|
55 |
@Override
|
56 |
public List<String> parameters_names() { |
57 |
return this.delegate.parameters_names(); |
58 |
} |
59 |
|
60 |
@Override
|
61 |
public String identifier(String name) { |
62 |
return this.delegate.identifier(name); |
63 |
} |
64 |
|
65 |
@Override
|
66 |
public String bytearray_hex(byte[] data) { |
67 |
return this.delegate.bytearray_hex(data); |
68 |
} |
69 |
|
70 |
@Override
|
71 |
public String bytearray_0x(byte[] data) { |
72 |
return this.delegate.bytearray_0x(data); |
73 |
} |
74 |
|
75 |
@Override
|
76 |
public String bytearray_x(byte[] data) { |
77 |
return this.delegate.bytearray_x(data); |
78 |
} |
79 |
|
80 |
@Override
|
81 |
public String string(String s) { |
82 |
return this.delegate.string(s); |
83 |
} |
84 |
|
85 |
@Override
|
86 |
public Value value() {
|
87 |
return this.delegate.value(); |
88 |
} |
89 |
|
90 |
@Override
|
91 |
public ExpressionBuilder value(Value value) {
|
92 |
return this.delegate.value(value); |
93 |
} |
94 |
|
95 |
@Override
|
96 |
public Group group(Value group) { |
97 |
return this.delegate.group(group); |
98 |
} |
99 |
|
100 |
@Override
|
101 |
public Constant bytearray(byte[] data) { |
102 |
return this.delegate.bytearray(data); |
103 |
} |
104 |
|
105 |
@Override
|
106 |
public Variable variable(String name) { |
107 |
return this.delegate.variable(name); |
108 |
} |
109 |
|
110 |
@Override
|
111 |
public Variable column(String name) { |
112 |
return this.delegate.column(name); |
113 |
} |
114 |
|
115 |
@Override
|
116 |
public Value column(String tableName, String columnName) { |
117 |
return this.delegate.column(tableName, columnName); |
118 |
} |
119 |
|
120 |
@Override
|
121 |
public Parameter parameter(String name) { |
122 |
return this.delegate.parameter(name); |
123 |
} |
124 |
|
125 |
@Override
|
126 |
public Parameter parameter() {
|
127 |
return this.delegate.parameter(); |
128 |
} |
129 |
|
130 |
@Override
|
131 |
public Constant constant(Object value) { |
132 |
return this.delegate.constant(value); |
133 |
} |
134 |
|
135 |
@Override
|
136 |
public Constant constant(Object value, int type) { |
137 |
return this.delegate.constant(value, type); |
138 |
} |
139 |
|
140 |
@Override
|
141 |
public Constant constant(Object value, Class theClass) { |
142 |
return this.delegate.constant(value, theClass); |
143 |
} |
144 |
|
145 |
@Override
|
146 |
public Custom custom(Object value) { |
147 |
return this.delegate.custom(value); |
148 |
} |
149 |
|
150 |
@Override
|
151 |
public Method method(Value instance, String name, Value... values) { |
152 |
return this.delegate.method(instance, name, values); |
153 |
} |
154 |
|
155 |
@Override
|
156 |
public Function function(String name, Value... values) { |
157 |
return this.delegate.function(name, values); |
158 |
} |
159 |
|
160 |
@Override
|
161 |
public BinaryOperator binaryOperator(String name, Value leftOperand, Value rightOperand) { |
162 |
return this.delegate.binaryOperator(name, leftOperand, rightOperand); |
163 |
} |
164 |
|
165 |
@Override
|
166 |
public Value toValue(String expression) { |
167 |
return this.delegate.toValue(expression); |
168 |
} |
169 |
|
170 |
@Override
|
171 |
public String repr(Object value) { |
172 |
return this.delegate.repr(value); |
173 |
} |
174 |
|
175 |
@Override
|
176 |
public String toString() { |
177 |
return this.delegate.toString(formatter()); |
178 |
} |
179 |
|
180 |
@Override
|
181 |
public String toString(Formatter<Value> formatter) { |
182 |
return this.delegate.toString(formatter); |
183 |
} |
184 |
|
185 |
@Override
|
186 |
public Function not(Value value) {
|
187 |
return this.delegate.not(value); |
188 |
} |
189 |
|
190 |
@Override
|
191 |
public Function not_is_null(Value value) {
|
192 |
return this.delegate.not_is_null(value); |
193 |
} |
194 |
|
195 |
@Override
|
196 |
public Function is_null(Value value) {
|
197 |
return this.delegate.is_null(value); |
198 |
} |
199 |
|
200 |
@Override
|
201 |
public BinaryOperator and(Value op1, Value op2) {
|
202 |
return this.delegate.and(op1, op2); |
203 |
} |
204 |
|
205 |
@Override
|
206 |
public BinaryOperator and(Expression op1, Expression op2) { |
207 |
return this.delegate.and(op1, op2); |
208 |
} |
209 |
|
210 |
@Override
|
211 |
public BinaryOperator and(Expression op1, Value op2) { |
212 |
return this.delegate.and(op1, op1); |
213 |
} |
214 |
|
215 |
@Override
|
216 |
public BinaryOperator or(Value op1, Value op2) {
|
217 |
return this.delegate.or(op1, op2); |
218 |
} |
219 |
|
220 |
@Override
|
221 |
public BinaryOperator eq(Value op1, Value op2) {
|
222 |
return this.delegate.eq(op1, op2); |
223 |
} |
224 |
|
225 |
@Override
|
226 |
public BinaryOperator ne(Value op1, Value op2) {
|
227 |
return this.delegate.ne(op1, op2); |
228 |
} |
229 |
|
230 |
@Override
|
231 |
public BinaryOperator gt(Value op1, Value op2) {
|
232 |
return this.delegate.gt(op1, op2); |
233 |
} |
234 |
|
235 |
@Override
|
236 |
public BinaryOperator ge(Value op1, Value op2) {
|
237 |
return this.delegate.ge(op1, op2); |
238 |
} |
239 |
|
240 |
@Override
|
241 |
public BinaryOperator lt(Value op1, Value op2) {
|
242 |
return this.delegate.lt(op1, op2); |
243 |
} |
244 |
|
245 |
@Override
|
246 |
public BinaryOperator le(Value op1, Value op2) {
|
247 |
return this.delegate.le(op1, op2); |
248 |
} |
249 |
|
250 |
@Override
|
251 |
public BinaryOperator like(Value op1, Value op2) {
|
252 |
return this.delegate.like(op1, op2); |
253 |
} |
254 |
|
255 |
@Override
|
256 |
public BinaryOperator ilike(Value op1, Value op2) {
|
257 |
return this.delegate.ilike(op1, op2); |
258 |
} |
259 |
|
260 |
@Override
|
261 |
public BinaryOperator add(Value op1, Value op2) {
|
262 |
return this.delegate.add(op1, op2); |
263 |
} |
264 |
|
265 |
@Override
|
266 |
public BinaryOperator subst(Value op1, Value op2) {
|
267 |
return this.delegate.subst(op1, op2); |
268 |
} |
269 |
|
270 |
@Override
|
271 |
public BinaryOperator mult(Value op1, Value op2) {
|
272 |
return this.delegate.mult(op1, op2); |
273 |
} |
274 |
|
275 |
@Override
|
276 |
public BinaryOperator div(Value op1, Value op2) {
|
277 |
return this.delegate.div(op1, op2); |
278 |
} |
279 |
|
280 |
@Override
|
281 |
public Function concat(Value... values) {
|
282 |
return this.delegate.concat(values); |
283 |
} |
284 |
|
285 |
@Override
|
286 |
public ExpressionBuilder set(Value value) {
|
287 |
return this.delegate.set(value); |
288 |
} |
289 |
|
290 |
@Override
|
291 |
public ExpressionBuilder and(Value value) {
|
292 |
return this.delegate.and(value); |
293 |
} |
294 |
|
295 |
@Override
|
296 |
public ExpressionBuilder or(Value value) {
|
297 |
return this.delegate.or(value); |
298 |
} |
299 |
|
300 |
@Override
|
301 |
public Function iif(Value condition, Value iftrue, Value iffalse) {
|
302 |
return this.delegate.iif(condition, iftrue, iffalse); |
303 |
} |
304 |
|
305 |
@Override
|
306 |
public Function ifnull(Value value, Value iftrue, Value iffalse) {
|
307 |
return this.delegate.ifnull(value, iftrue, iffalse); |
308 |
} |
309 |
|
310 |
@Override
|
311 |
public ExpressionBuilder createExpressionBuilder() {
|
312 |
return this.delegate.createExpressionBuilder(); |
313 |
} |
314 |
|
315 |
@Override
|
316 |
public Function left(Value str, Value size) {
|
317 |
return this.delegate.left(str, size); |
318 |
} |
319 |
|
320 |
@Override
|
321 |
public Function right(Value str, Value len) {
|
322 |
return this.delegate.right(str, len); |
323 |
} |
324 |
|
325 |
@Override
|
326 |
public Function locate(Value search, Value str, Value start) {
|
327 |
return this.delegate.locate(search, str, start); |
328 |
} |
329 |
|
330 |
@Override
|
331 |
public Function position(Value search, Value str) {
|
332 |
return this.delegate.position(search, str); |
333 |
} |
334 |
|
335 |
@Override
|
336 |
public Function lpad(Value str, Value len, Value padstr) {
|
337 |
return this.delegate.lpad(str, len, padstr); |
338 |
} |
339 |
|
340 |
@Override
|
341 |
public Function rpad(Value str, Value len, Value padstr) {
|
342 |
return this.delegate.rpad(str, len, padstr); |
343 |
} |
344 |
|
345 |
@Override
|
346 |
public Function ltrim(Value str) {
|
347 |
return this.delegate.ltrim(str); |
348 |
} |
349 |
|
350 |
@Override
|
351 |
public Function rtrim(Value str) {
|
352 |
return this.delegate.rtrim(str); |
353 |
} |
354 |
|
355 |
@Override
|
356 |
public Function trim(Value str) {
|
357 |
return this.delegate.trim(str); |
358 |
} |
359 |
|
360 |
@Override
|
361 |
public Function repeat(Value str, Value size) {
|
362 |
return this.delegate.repeat(str, size); |
363 |
} |
364 |
|
365 |
@Override
|
366 |
public Function replace(Value str, Value search, Value replstr) {
|
367 |
return this.delegate.replace(str, search, replstr); |
368 |
} |
369 |
|
370 |
@Override
|
371 |
public Function ascii(Value str) {
|
372 |
return this.delegate.ascii(str); |
373 |
} |
374 |
|
375 |
@Override
|
376 |
public Function lenght(Value str) {
|
377 |
return this.delegate.lenght(str); |
378 |
} |
379 |
|
380 |
@Override
|
381 |
public Function instr(Value str, Value search, Value start) {
|
382 |
return this.delegate.instr(str, search, start); |
383 |
} |
384 |
|
385 |
@Override
|
386 |
public Function lower(Value str) {
|
387 |
return this.delegate.lower(str); |
388 |
} |
389 |
|
390 |
@Override
|
391 |
public Function upper(Value str) {
|
392 |
return this.delegate.upper(str); |
393 |
} |
394 |
|
395 |
@Override
|
396 |
public Function space(Value size) {
|
397 |
return this.delegate.space(size); |
398 |
} |
399 |
|
400 |
@Override
|
401 |
public Function substring(Value str, Value start, Value len) {
|
402 |
return this.delegate.substring(str, start, len); |
403 |
} |
404 |
|
405 |
@Override
|
406 |
public Function abs(Value num) {
|
407 |
return this.delegate.abs(num); |
408 |
} |
409 |
|
410 |
@Override
|
411 |
public Function acos(Value num) {
|
412 |
return this.delegate.acos(num); |
413 |
} |
414 |
|
415 |
@Override
|
416 |
public Function asin(Value num) {
|
417 |
return this.delegate.asin(num); |
418 |
} |
419 |
|
420 |
@Override
|
421 |
public Function atan(Value num) {
|
422 |
return this.delegate.atan(num); |
423 |
} |
424 |
|
425 |
@Override
|
426 |
public Function cos(Value num) {
|
427 |
return this.delegate.cos(num); |
428 |
} |
429 |
|
430 |
@Override
|
431 |
public Function cosh(Value num) {
|
432 |
return this.delegate.cosh(num); |
433 |
} |
434 |
|
435 |
@Override
|
436 |
public Function cot(Value num) {
|
437 |
return this.delegate.cot(num); |
438 |
} |
439 |
|
440 |
@Override
|
441 |
public Function bitand(Value num1, Value num2) {
|
442 |
return this.delegate.bitand(num1, num2); |
443 |
} |
444 |
|
445 |
@Override
|
446 |
public Function bitor(Value num1, Value num2) {
|
447 |
return this.delegate.bitor(num1, num2); |
448 |
} |
449 |
|
450 |
@Override
|
451 |
public Function bitxor(Value num1, Value num2) {
|
452 |
return this.delegate.bitxor(num1, num2); |
453 |
} |
454 |
|
455 |
@Override
|
456 |
public Function ceil(Value num) {
|
457 |
return this.delegate.ceil(num); |
458 |
} |
459 |
|
460 |
@Override
|
461 |
public Function degrees(Value num) {
|
462 |
return this.delegate.degrees(num); |
463 |
} |
464 |
|
465 |
@Override
|
466 |
public Function exp(Value num) {
|
467 |
return this.delegate.exp(num); |
468 |
} |
469 |
|
470 |
@Override
|
471 |
public Function floor(Value num) {
|
472 |
return this.delegate.floor(num); |
473 |
} |
474 |
|
475 |
@Override
|
476 |
public Function log(Value num) {
|
477 |
return this.delegate.log(num); |
478 |
} |
479 |
|
480 |
@Override
|
481 |
public Function log10(Value num) {
|
482 |
return this.delegate.log10(num); |
483 |
} |
484 |
|
485 |
@Override
|
486 |
public Function pi() {
|
487 |
return this.delegate.pi(); |
488 |
} |
489 |
|
490 |
@Override
|
491 |
public Function power(Value num) {
|
492 |
return this.delegate.power(num); |
493 |
} |
494 |
|
495 |
@Override
|
496 |
public Function radians(Value num) {
|
497 |
return this.delegate.radians(num); |
498 |
} |
499 |
|
500 |
@Override
|
501 |
public Function rand(Value num) {
|
502 |
return this.delegate.rand(num); |
503 |
} |
504 |
|
505 |
@Override
|
506 |
public Function round(Value num) {
|
507 |
return this.delegate.round(num); |
508 |
} |
509 |
|
510 |
@Override
|
511 |
public Function sqrt(Value num) {
|
512 |
return this.delegate.sqrt(num); |
513 |
} |
514 |
|
515 |
@Override
|
516 |
public Function sign(Value num) {
|
517 |
return this.delegate.sign(num); |
518 |
} |
519 |
|
520 |
@Override
|
521 |
public Function sin(Value num) {
|
522 |
return this.delegate.sin(num); |
523 |
} |
524 |
|
525 |
@Override
|
526 |
public Function sinh(Value num) {
|
527 |
return this.delegate.sinh(num); |
528 |
} |
529 |
|
530 |
@Override
|
531 |
public Function tan(Value num) {
|
532 |
return this.delegate.tan(num); |
533 |
} |
534 |
|
535 |
@Override
|
536 |
public Function tanh(Value num) {
|
537 |
return this.delegate.tanh(num); |
538 |
} |
539 |
|
540 |
@Override
|
541 |
public Function zero() {
|
542 |
return this.delegate.zero(); |
543 |
} |
544 |
|
545 |
@Override
|
546 |
public Function chr(Value num) {
|
547 |
return this.delegate.chr(num); |
548 |
} |
549 |
|
550 |
@Override
|
551 |
public Function decode(Value value, Value format) {
|
552 |
return this.delegate.decode(value, format); |
553 |
} |
554 |
|
555 |
@Override
|
556 |
public Function cast(Value object, Value typeName) {
|
557 |
return this.delegate.cast(object, typeName); |
558 |
} |
559 |
|
560 |
@Override
|
561 |
public Function cast(Value object, int type) { |
562 |
return this.delegate.cast(object, type); |
563 |
} |
564 |
|
565 |
@Override
|
566 |
public Function toDouble(Value object) {
|
567 |
return this.delegate.toDouble(object); |
568 |
} |
569 |
|
570 |
@Override
|
571 |
public Function toFloat(Value object) {
|
572 |
return this.delegate.toFloat(object); |
573 |
} |
574 |
|
575 |
@Override
|
576 |
public Function toLong(Value object) {
|
577 |
return this.delegate.toLong(object); |
578 |
} |
579 |
|
580 |
@Override
|
581 |
public Function toInteger(Value object) {
|
582 |
return this.delegate.toInteger(object); |
583 |
} |
584 |
|
585 |
@Override
|
586 |
public Function toStr(Value object) {
|
587 |
return this.delegate.toStr(object); |
588 |
} |
589 |
|
590 |
@Override
|
591 |
public Function list() {
|
592 |
return this.delegate.list(); |
593 |
} |
594 |
|
595 |
@Override
|
596 |
public Function tuple() {
|
597 |
return this.delegate.tuple(); |
598 |
} |
599 |
|
600 |
@Override
|
601 |
public Function tuple(Object... values) { |
602 |
return this.delegate.tuple(values); |
603 |
} |
604 |
|
605 |
@Override
|
606 |
public Function getattr(String objectId, String attributeId) { |
607 |
return this.delegate.getattr(objectId, attributeId); |
608 |
} |
609 |
|
610 |
@Override
|
611 |
public boolean isEmpty() { |
612 |
return this.delegate.isEmpty(); |
613 |
} |
614 |
|
615 |
@Override
|
616 |
public Function color(Value red, Value green, Value blue, Value alfa) {
|
617 |
return this.delegate.color(red, green, blue, alfa); |
618 |
} |
619 |
|
620 |
@Override
|
621 |
public Function color(Color color) { |
622 |
return this.delegate.color(color); |
623 |
} |
624 |
|
625 |
@Override
|
626 |
public Function date(Value date) {
|
627 |
return this.delegate.date(date); |
628 |
} |
629 |
|
630 |
@Override
|
631 |
public Function time(Value date) {
|
632 |
return this.delegate.time(date); |
633 |
} |
634 |
|
635 |
@Override
|
636 |
public Function timestamp(Value date) {
|
637 |
return this.delegate.timestamp(date); |
638 |
} |
639 |
|
640 |
@Override
|
641 |
public Function date(Date date) { |
642 |
return this.delegate.date(date); |
643 |
} |
644 |
|
645 |
@Override
|
646 |
public Function time(Date time) { |
647 |
return this.delegate.time(time); |
648 |
} |
649 |
|
650 |
@Override
|
651 |
public Function timestamp(Date timestamp) { |
652 |
return this.delegate.timestamp(timestamp); |
653 |
} |
654 |
|
655 |
@Override
|
656 |
public Function date(String date) { |
657 |
return this.delegate.date(date); |
658 |
} |
659 |
|
660 |
@Override
|
661 |
public Function time(String time) { |
662 |
return this.delegate.time(time); |
663 |
} |
664 |
|
665 |
@Override
|
666 |
public Function timestamp(String timestamp) { |
667 |
return this.delegate.timestamp(timestamp); |
668 |
} |
669 |
|
670 |
@Override
|
671 |
public Function to_date(Value date, Value format) {
|
672 |
return this.delegate.to_date(date, format); |
673 |
} |
674 |
|
675 |
@Override
|
676 |
public Function to_timestamp(Value timestamp, Value format) {
|
677 |
return this.delegate.to_timestamp(timestamp, format); |
678 |
} |
679 |
|
680 |
@Override
|
681 |
public Function current_date() {
|
682 |
return this.delegate.current_date(); |
683 |
} |
684 |
|
685 |
@Override
|
686 |
public Function current_time() {
|
687 |
return this.delegate.current_time(); |
688 |
} |
689 |
|
690 |
@Override
|
691 |
public Function current_timestamp() {
|
692 |
return this.delegate.current_timestamp(); |
693 |
} |
694 |
|
695 |
@Override
|
696 |
public Function let(String name, Value value) { |
697 |
return this.delegate.let(name, value); |
698 |
} |
699 |
|
700 |
@Override
|
701 |
public Function date_add(Value datefield, Value valueToAdd, Value date) {
|
702 |
return this.delegate.date_add(datefield, valueToAdd, date); |
703 |
} |
704 |
|
705 |
@Override
|
706 |
public Function date_diff(Value datefield, Value valueToSubst, Value date) {
|
707 |
return this.delegate.date_diff(datefield, valueToSubst, date); |
708 |
} |
709 |
|
710 |
@Override
|
711 |
public Function extract(Value datefield, Value source) {
|
712 |
return this.delegate.extract(datefield, source); |
713 |
} |
714 |
|
715 |
@Override
|
716 |
public String build(Formatter<Value> formatter) { |
717 |
return this.delegate.build(formatter); |
718 |
} |
719 |
|
720 |
@Override
|
721 |
public String build() { |
722 |
return this.delegate.build(formatter()); |
723 |
} |
724 |
|
725 |
@Override
|
726 |
public void setProperties(Class filter, Object... values) { |
727 |
this.delegate.setProperties(filter, values);
|
728 |
} |
729 |
|
730 |
@Override
|
731 |
public Object getProperty(String name) { |
732 |
return this.delegate.getProperty(name); |
733 |
} |
734 |
|
735 |
@Override
|
736 |
public void setProperty(String name, Object value) { |
737 |
this.delegate.setProperty(name, value);
|
738 |
} |
739 |
|
740 |
@Override
|
741 |
public Map<String, Object> getProperties() { |
742 |
return this.delegate.getProperties(); |
743 |
} |
744 |
|
745 |
} |