1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package org.seasar.tuigwaa.database.function.criteria;
23
24 /***
25 * @author nishioka
26 *
27 * TODO To change the template for this generated type comment go to Window -
28 * Preferences - Java - Code Style - Code Templates
29 */
30 public abstract class AbstractCriteriaFunction implements
31 CriteriaFunction{
32
33 private String field_;
34
35 private Object value_;
36
37 private String option;
38
39 private String name;
40
41 public AbstractCriteriaFunction() {
42 }
43
44 public AbstractCriteriaFunction(String field) {
45 this.field_ = field;
46 }
47
48 public AbstractCriteriaFunction(String field, Object value) {
49 this.field_ = field;
50 this.value_ = value;
51 }
52
53
54
55 public Object evaluate(Object obj) {
56 return evaluate((ICriteria) obj);
57 }
58
59 public abstract Object evaluate(ICriteria criteria);
60
61 public Object evaluate(Object left, Object right) {
62 return evaluate((ICriteria) left, right);
63 }
64
65 public abstract Object evaluate(ICriteria criteria, Object right);
66
67
68
69
70
71 public final void setValue(Object value) {
72 this.value_ = value;
73 }
74
75 public final void setField(String field) {
76 this.field_ = field;
77 }
78
79 public final Object getValue() {
80 return this.value_;
81 }
82
83 public final String getField() {
84 return this.field_;
85 }
86
87 public final String getOption() {
88 return option;
89 }
90
91 public final void setOption(String option) {
92 this.option = option;
93 }
94
95 public final void setName(String name) {
96 this.name = name;
97 }
98
99 public final String getName() {
100 return name;
101 }
102
103
104 }