1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.apache.struts.validator;
22
23 import java.util.HashMap;
24 import java.util.Map;
25
26
27
28
29 public class PojoBean {
30 protected String stringValue1;
31 protected String stringValue2;
32 protected int intValue1;
33 protected int intValue2;
34 protected Integer integerValue1;
35 protected Integer integerValue2;
36 protected PojoBean[] beans;
37 protected Map map = new HashMap();
38
39
40
41
42 public PojoBean() {
43 }
44
45
46
47
48 public PojoBean(String stringValue1, String stringValue2) {
49 setStringValue1(stringValue1);
50 setStringValue2(stringValue2);
51 }
52
53
54
55
56 public PojoBean(int intValue1, int intValue2) {
57 setIntValue1(intValue1);
58 setIntValue2(intValue2);
59 setIntegerValue1(new Integer(intValue1));
60 setIntegerValue2(new Integer(intValue2));
61 }
62
63
64
65
66 public void setStringValue1(String stringValue1) {
67 this.stringValue1 = stringValue1;
68 }
69
70
71
72
73 public String getStringValue1() {
74 return stringValue1;
75 }
76
77
78
79
80 public void setStringValue2(String stringValue2) {
81 this.stringValue2 = stringValue2;
82 }
83
84
85
86
87 public String getStringValue2() {
88 return stringValue2;
89 }
90
91
92
93
94 public void setIntValue1(int intValue1) {
95 this.intValue1 = intValue1;
96 }
97
98
99
100
101 public int getIntValue1() {
102 return intValue1;
103 }
104
105
106
107
108 public void setIntValue2(int intValue2) {
109 this.intValue2 = intValue2;
110 }
111
112
113
114
115 public int getIntValue2() {
116 return intValue2;
117 }
118
119
120
121
122 public void setIntegerValue1(Integer integerValue1) {
123 this.integerValue1 = integerValue1;
124 }
125
126
127
128
129 public Integer getIntegerValue1() {
130 return integerValue1;
131 }
132
133
134
135
136 public void setIntegerValue2(Integer integerValue2) {
137 this.integerValue2 = integerValue2;
138 }
139
140
141
142
143 public Integer getIntegerValue2() {
144 return integerValue2;
145 }
146
147
148
149
150 public void setBeans(PojoBean[] beans) {
151 this.beans = beans;
152 }
153
154
155
156
157 public PojoBean[] getBeans() {
158 return beans;
159 }
160
161
162
163
164 public PojoBean getBean(int index) {
165 return beans[index];
166 }
167
168
169
170
171 public Object getMap() {
172 return map;
173 }
174
175
176
177
178 public void setMap(Map map) {
179 this.map = map;
180 }
181
182
183
184
185 public void setMapped(String key, Object value) {
186 map.put(key, value);
187 }
188
189
190
191
192 public Object getMapped(String key) {
193 return map.get(key);
194 }
195 }