001: /*
002: * $Id: ExampleBean.java 471754 2006-11-06 14:55:09Z husted $
003: *
004: * Licensed to the Apache Software Foundation (ASF) under one
005: * or more contributor license agreements. See the NOTICE file
006: * distributed with this work for additional information
007: * regarding copyright ownership. The ASF licenses this file
008: * to you under the Apache License, Version 2.0 (the
009: * "License"); you may not use this file except in compliance
010: * with the License. You may obtain a copy of the License at
011: *
012: * http://www.apache.org/licenses/LICENSE-2.0
013: *
014: * Unless required by applicable law or agreed to in writing,
015: * software distributed under the License is distributed on an
016: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017: * KIND, either express or implied. See the License for the
018: * specific language governing permissions and limitations
019: * under the License.
020: */
021:
022: package examples.bean;
023:
024: import java.io.Serializable;
025: import java.util.ArrayList;
026: import java.util.List;
027:
028: /**
029: * An example bean for Bean Examples
030: *
031: * @version $Rev: 471754 $ $Date: 2006-11-06 08:55:09 -0600 (Mon, 06 Nov 2006) $
032: */
033: public class ExampleBean implements Serializable {
034:
035: // ------------------------------------------------------ Instance Variables
036:
037: /** A boolean value */
038: private boolean booleanValue = false;
039:
040: /** A double value */
041: private double doubleValue = 45213.451;
042:
043: /** A float value */
044: private float floatValue = -123.582F;
045:
046: /** An integer value */
047: private int intValue = 256;
048:
049: /** A long integer value */
050: private long longValue = 1321546L;
051:
052: /** A short integer value */
053: private short shortValue = 257;
054:
055: /** A string value */
056: private String stringValue = "Hello, world!";
057:
058: /** A dateValue value */
059: private java.util.Date dateValue = new java.util.Date();
060:
061: /** A list */
062: private List list = new ArrayList();
063:
064: /** An array */
065: private String[] array = { "Red", "Green", "Blue", "Black",
066: "Orange" };
067:
068: /** A nested bean */
069: private NestedBean nested = null;
070:
071: /** HTML formatted markup */
072: private String html = "<p>This is a <strong>simple</strong> example of "
073: + "<em>HTML</em> formatted text.</p>";
074:
075: // ------------------------------------------------------------ Constructors
076:
077: /**
078: * Constructor for TestBean.
079: */
080: public ExampleBean() {
081: super ();
082: }
083:
084: // -------------------------------------------------------------- Properties
085:
086: /**
087: * Returns the booleanValue.
088: * @return boolean
089: */
090: public boolean isBooleanValue() {
091: return booleanValue;
092: }
093:
094: /**
095: * Returns the doubleValue.
096: * @return double
097: */
098: public double getDoubleValue() {
099: return doubleValue;
100: }
101:
102: /**
103: * Returns the floatValue.
104: * @return float
105: */
106: public float getFloatValue() {
107: return floatValue;
108: }
109:
110: /**
111: * Returns the intValue.
112: * @return int
113: */
114: public int getIntValue() {
115: return intValue;
116: }
117:
118: /**
119: * Returns the longValue.
120: * @return long
121: */
122: public long getLongValue() {
123: return longValue;
124: }
125:
126: /**
127: * Returns the shortValue.
128: * @return short
129: */
130: public short getShortValue() {
131: return shortValue;
132: }
133:
134: /**
135: * Returns the stringValue.
136: * @return String
137: */
138: public String getStringValue() {
139: return stringValue;
140: }
141:
142: /**
143: * Sets the booleanValue.
144: * @param booleanValue The booleanValue to set
145: */
146: public void setBooleanValue(boolean booleanValue) {
147: this .booleanValue = booleanValue;
148: }
149:
150: /**
151: * Sets the doubleValue.
152: * @param doubleValue The doubleValue to set
153: */
154: public void setDoubleValue(double doubleValue) {
155: this .doubleValue = doubleValue;
156: }
157:
158: /**
159: * Sets the floatValue.
160: * @param floatValue The floatValue to set
161: */
162: public void setFloatValue(float floatValue) {
163: this .floatValue = floatValue;
164: }
165:
166: /**
167: * Sets the intValue.
168: * @param intValue The intValue to set
169: */
170: public void setIntValue(int intValue) {
171: this .intValue = intValue;
172: }
173:
174: /**
175: * Sets the longValue.
176: * @param longValue The longValue to set
177: */
178: public void setLongValue(long longValue) {
179: this .longValue = longValue;
180: }
181:
182: /**
183: * Sets the shortValue.
184: * @param shortValue The shortValue to set
185: */
186: public void setShortValue(short shortValue) {
187: this .shortValue = shortValue;
188: }
189:
190: /**
191: * Sets the stringValue.
192: * @param stringValue The stringValue to set
193: */
194: public void setStringValue(String stringValue) {
195: this .stringValue = stringValue;
196: }
197:
198: /**
199: * Returns the list.
200: * @return List
201: */
202: public List getList() {
203: return list;
204: }
205:
206: /**
207: * Sets the list.
208: * @param list The list to set
209: */
210: public void setList(List list) {
211: this .list = list;
212: }
213:
214: /**
215: * Returns the nested.
216: * @return NestedBean
217: */
218: public NestedBean getNested() {
219: return nested;
220: }
221:
222: /**
223: * Sets the nested.
224: * @param nested The nested to set
225: */
226: public void setNested(NestedBean nested) {
227: this .nested = nested;
228: }
229:
230: /**
231: * Returns the dateValue.
232: * @return java.util.Date
233: */
234: public java.util.Date getDateValue() {
235: return dateValue;
236: }
237:
238: /**
239: * Sets the dateValue.
240: * @param date The date to set
241: */
242: public void setDateValue(java.util.Date date) {
243: this .dateValue = date;
244: }
245:
246: /**
247: * Returns the array.
248: * @return String[]
249: */
250: public String[] getArray() {
251: return array;
252: }
253:
254: /**
255: * Sets the array.
256: * @param array The array to set
257: */
258: public void setArray(String[] array) {
259: this .array = array;
260: }
261:
262: /**
263: * Returns the html.
264: * @return String
265: */
266: public String getHtml() {
267: return html;
268: }
269:
270: /**
271: * Sets the html.
272: * @param html The html to set
273: */
274: public void setHtml(String html) {
275: this.html = html;
276: }
277:
278: }
|