1
2
3
4
5
6
7
8 package com.buckosoft.PicMan.domain;
9
10
11
12
13
14
15
16
17 public class MetaSetRule {
18 private int sid;
19 private int index;
20
21 private int type;
22 private String value;
23 private int operator;
24 private int rateOp = 0;
25 private int rateVal;
26
27
28
29 public MetaSetRule() {}
30
31
32
33
34
35
36
37
38 public MetaSetRule(int sid, int index, int type, String value, int operator) {
39 this.sid = sid;
40 this.index = index;
41 this.type = type;
42 this.value = value;
43 this.operator = operator;
44 }
45
46
47
48
49 public int getSid() {
50 return sid;
51 }
52
53
54
55 public void setSid(int sid) {
56 this.sid = sid;
57 }
58
59
60
61 public int getIndex() {
62 return index;
63 }
64
65
66
67
68
69 public void setIndex(int index) {
70 this.index = index;
71 }
72
73
74
75 public int getType() {
76 return type;
77 }
78
79
80
81 public void setType(int type) {
82 this.type = type;
83 }
84
85
86
87 public String getValue() {
88 if (this.type == MetaSet.OPERATOR) {
89 if (this.operator == MetaSet.NONE)
90 return(MetaSet.s_NONE);
91 else if (this.operator == MetaSet.AND)
92 return(MetaSet.s_AND);
93 else if (this.operator == MetaSet.OR)
94 return(MetaSet.s_OR);
95 else if (this.operator == MetaSet.NOT)
96 return(MetaSet.s_NOT);
97 return(MetaSet.s_UNKNOWN);
98 }
99 return value;
100 }
101
102
103
104 public void setValue(String value) {
105 this.value = value;
106 if (this.type == MetaSet.OPERATOR) {
107 if (value.equals(MetaSet.s_NONE))
108 this.setOperator(MetaSet.NONE);
109 else if (value.equals(MetaSet.s_AND))
110 this.setOperator(MetaSet.AND);
111 else if (value.equals(MetaSet.s_OR))
112 this.setOperator(MetaSet.OR);
113 else if (value.equals(MetaSet.s_NOT))
114 this.setOperator(MetaSet.NOT);
115 }
116 }
117
118
119
120 public int getOperator() {
121 return operator;
122 }
123
124
125
126 public void setOperator(int operator) {
127 this.operator = operator;
128 }
129
130
131
132
133 public int getRateOp() {
134 return rateOp;
135 }
136
137
138
139
140 public void setRateOp(int rateOp) {
141 this.rateOp = rateOp;
142 }
143
144
145
146
147 public int getRateVal() {
148 return rateVal;
149 }
150
151
152
153
154 public void setRateVal(int rateVal) {
155 this.rateVal = rateVal;
156 }
157
158
159
160
161 public int getFunc() {
162 return(rateVal);
163 }
164
165 public void setFunc(int func) {
166 this.rateVal = func;
167 }
168
169 }