1 /*
2 * Scope: a generic MVC framework.
3 * Copyright (c) 2000-2002, The Scope team
4 * All rights reserved.
5 *
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 *
11 * Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 *
14 * Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 *
18 * Neither the name "Scope" nor the names of its contributors
19 * may be used to endorse or promote products derived from this software
20 * without specific prior written permission.
21 *
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
27 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
28 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
29 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
30 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
31 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
32 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 *
35 *
36 * $Id: ModelObject.java,v 1.3 2002/09/05 15:41:50 ludovicc Exp $
37 */
38 package test.model.beans;
39
40
41 import java.util.ArrayList;
42
43 /***
44 * <P>
45 *
46 * </P>
47 *
48 * @author <A HREF="mailto:smeyfroi@users.sourceforge.net">Steve Meyfroidt</A>
49 * @created 05 September 2002
50 * @version $Revision: 1.3 $ $Date: 2002/09/05 15:41:50 $
51 */
52 public final class ModelObject {
53
54 // --------------------- Some actions -----------------------
55
56 boolean doneAction1;
57 int action2;
58
59 private String stringProperty = "sp";
60 private int intProperty = 1;
61 private String[] stringIndexedProperty = {"sip0", "sip1"};
62 private String[] hiddenStringIndexedProperty = {"hsip0", "hsip1"};
63 private ArrayList stringNonIndexedProperty = new ArrayList();
64 private String readOnlyStringProperty = "rosp";
65 private String[] stringNonIndexedProperty2 = new String[2];
66
67 private ModelObject subModel;
68
69 /***
70 * Constructor for the ModelObject object
71 */
72 public ModelObject() {
73 stringNonIndexedProperty.add("snip0");
74 stringNonIndexedProperty.add("snip1");
75 stringNonIndexedProperty2[0] = "snip20";
76 stringNonIndexedProperty2[1] = "snip21";
77 }
78
79
80 /***
81 * Gets the string property
82 *
83 * @return The stringProperty value
84 */
85 public String getStringProperty() {
86 return stringProperty;
87 }
88
89
90 /***
91 * Gets the int property
92 *
93 * @return The intProperty value
94 */
95 public int getIntProperty() {
96 return intProperty;
97 }
98
99
100 /***
101 * Gets the string indexed property
102 *
103 * @return The stringIndexedProperty value
104 */
105 public String[] getStringIndexedProperty() {
106 return stringIndexedProperty;
107 }
108
109
110 /***
111 * Gets the string indexed property
112 *
113 * @param inIndex TODO: Describe the Parameter
114 * @return The stringIndexedProperty value
115 */
116 public String getStringIndexedProperty(int inIndex) {
117 return stringIndexedProperty[inIndex];
118 }
119
120
121 /***
122 * Gets the hidden string indexed property
123 *
124 * @param inIndex TODO: Describe the Parameter
125 * @return The hiddenStringIndexedProperty value
126 */
127 public String getHiddenStringIndexedProperty(int inIndex) {
128 return hiddenStringIndexedProperty[inIndex];
129 }
130
131
132 /***
133 * Gets the string non indexed property
134 *
135 * @return The stringNonIndexedProperty value
136 */
137 public ArrayList getStringNonIndexedProperty() {
138 return stringNonIndexedProperty;
139 }
140
141
142 /***
143 * Gets the string non indexed property2
144 *
145 * @return The stringNonIndexedProperty2 value
146 */
147 public String[] getStringNonIndexedProperty2() {
148 return stringNonIndexedProperty2;
149 }
150
151
152 /***
153 * Gets the read only string property
154 *
155 * @return The readOnlyStringProperty value
156 */
157 public String getReadOnlyStringProperty() {
158 return readOnlyStringProperty;
159 }
160
161
162 /***
163 * Gets the sub model
164 *
165 * @return The subModel value
166 */
167 public ModelObject getSubModel() {
168 return subModel;
169 }
170
171
172 /***
173 * Sets the string property
174 *
175 * @param inString The new stringProperty value
176 */
177 public void setStringProperty(String inString) {
178 stringProperty = inString;
179 }
180
181
182 /***
183 * Sets the int property
184 *
185 * @param inInt The new intProperty value
186 */
187 public void setIntProperty(int inInt) {
188 intProperty = inInt;
189 }
190
191
192 /***
193 * Sets the string indexed property
194 *
195 * @param inStrings The new stringIndexedProperty value
196 */
197 public void setStringIndexedProperty(String[] inStrings) {
198 stringIndexedProperty = inStrings;
199 }
200
201
202 /***
203 * Sets the string indexed property
204 *
205 * @param inIndex The new stringIndexedProperty value
206 * @param inString The new stringIndexedProperty value
207 */
208 public void setStringIndexedProperty(int inIndex, String inString) {
209 stringIndexedProperty[inIndex] = inString;
210 }
211
212
213 /***
214 * Sets the hidden string indexed property
215 *
216 * @param inIndex The new hiddenStringIndexedProperty value
217 * @param inString The new hiddenStringIndexedProperty value
218 */
219 public void setHiddenStringIndexedProperty(int inIndex, String inString) {
220 hiddenStringIndexedProperty[inIndex] = inString;
221 }
222
223
224 /***
225 * Sets the string non indexed property
226 *
227 * @param inList The new stringNonIndexedProperty value
228 */
229 public void setStringNonIndexedProperty(ArrayList inList) {
230 stringNonIndexedProperty = inList;
231 }
232
233
234 /***
235 * Sets the string non indexed property2
236 *
237 * @param inArray The new stringNonIndexedProperty2 value
238 */
239 public void setStringNonIndexedProperty2(String[] inArray) {
240 stringNonIndexedProperty2 = inArray;
241 }
242
243
244 /***
245 * Sets the sub model
246 *
247 * @param inModel The new subModel value
248 */
249 public void setSubModel(ModelObject inModel) {
250 subModel = inModel;
251 }
252
253
254 /***
255 * TODO: document the method
256 */
257 public void action1() {
258 doneAction1 = true;
259 }
260
261
262 /***
263 * TODO: document the method
264 *
265 * @param inParameter TODO: Describe the Parameter
266 */
267 public void action2(int inParameter) {
268 action2 = inParameter;
269 }
270
271
272 /***
273 * TODO: document the method
274 *
275 * @param inParameter TODO: Describe the Parameter
276 * @return TODO: Describe the Return Value
277 */
278 public long action3(long inParameter) {
279 return inParameter;
280 }
281 }
282
This page was automatically generated by Maven