View Javadoc

1   /*
2    * $Id: ExampleBean.java 421486 2006-07-13 03:37:08Z wsmoak $
3    *
4    * Copyright 2005 The Apache Software Foundation.
5    *
6    * Licensed under the Apache License, Version 2.0 (the "License");
7    * you may not use this file except in compliance with the License.
8    * You may obtain a copy of the License at
9    *
10   *      http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing, software
13   * distributed under the License is distributed on an "AS IS" BASIS,
14   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   * See the License for the specific language governing permissions and
16   * limitations under the License.
17   */
18  
19  package examples.bean;
20  
21  import java.io.Serializable;
22  import java.util.ArrayList;
23  import java.util.List;
24  
25  /***
26   * An example bean for Bean Examples
27   *
28   * @version $Rev: 421486 $ $Date: 2006-07-12 20:37:08 -0700 (Wed, 12 Jul 2006) $
29   */
30  public class ExampleBean implements Serializable {
31  
32      // ------------------------------------------------------ Instance Variables
33  
34      /*** A boolean value */
35      private boolean booleanValue = false;
36  
37      /*** A double value */
38      private double doubleValue = 45213.451;
39  
40      /*** A float value */
41      private float floatValue = -123.582F;
42  
43      /*** An integer value */
44      private int intValue = 256;
45  
46      /*** A long integer value */
47      private long longValue = 1321546L;
48  
49      /*** A short integer value */
50      private short shortValue = 257;
51  
52      /*** A string value */
53      private String stringValue = "Hello, world!";
54  
55      /*** A dateValue value */
56      private java.util.Date dateValue = new java.util.Date();
57  
58      /*** A list */
59      private List list = new ArrayList();
60  
61      /*** An array */
62      private String[] array = { "Red", "Green", "Blue", "Black", "Orange" };
63  
64      /*** A nested bean */
65      private NestedBean nested = null;
66  
67      /*** HTML formatted markup */
68      private String html =
69            "<p>This is a <strong>simple</strong> example of "
70          + "<em>HTML</em> formatted text.</p>";
71  
72      // ------------------------------------------------------------ Constructors
73  
74      /***
75       * Constructor for TestBean.
76       */
77      public ExampleBean() {
78          super();
79      }
80  
81  
82      // -------------------------------------------------------------- Properties
83  
84      /***
85       * Returns the booleanValue.
86       * @return boolean
87       */
88      public boolean isBooleanValue() {
89          return booleanValue;
90      }
91  
92      /***
93       * Returns the doubleValue.
94       * @return double
95       */
96      public double getDoubleValue() {
97          return doubleValue;
98      }
99  
100     /***
101      * Returns the floatValue.
102      * @return float
103      */
104     public float getFloatValue() {
105         return floatValue;
106     }
107 
108     /***
109      * Returns the intValue.
110      * @return int
111      */
112     public int getIntValue() {
113         return intValue;
114     }
115 
116     /***
117      * Returns the longValue.
118      * @return long
119      */
120     public long getLongValue() {
121         return longValue;
122     }
123 
124     /***
125      * Returns the shortValue.
126      * @return short
127      */
128     public short getShortValue() {
129         return shortValue;
130     }
131 
132     /***
133      * Returns the stringValue.
134      * @return String
135      */
136     public String getStringValue() {
137         return stringValue;
138     }
139 
140     /***
141      * Sets the booleanValue.
142      * @param booleanValue The booleanValue to set
143      */
144     public void setBooleanValue(boolean booleanValue) {
145         this.booleanValue = booleanValue;
146     }
147 
148     /***
149      * Sets the doubleValue.
150      * @param doubleValue The doubleValue to set
151      */
152     public void setDoubleValue(double doubleValue) {
153         this.doubleValue = doubleValue;
154     }
155 
156     /***
157      * Sets the floatValue.
158      * @param floatValue The floatValue to set
159      */
160     public void setFloatValue(float floatValue) {
161         this.floatValue = floatValue;
162     }
163 
164     /***
165      * Sets the intValue.
166      * @param intValue The intValue to set
167      */
168     public void setIntValue(int intValue) {
169         this.intValue = intValue;
170     }
171 
172     /***
173      * Sets the longValue.
174      * @param longValue The longValue to set
175      */
176     public void setLongValue(long longValue) {
177         this.longValue = longValue;
178     }
179 
180     /***
181      * Sets the shortValue.
182      * @param shortValue The shortValue to set
183      */
184     public void setShortValue(short shortValue) {
185         this.shortValue = shortValue;
186     }
187 
188     /***
189      * Sets the stringValue.
190      * @param stringValue The stringValue to set
191      */
192     public void setStringValue(String stringValue) {
193         this.stringValue = stringValue;
194     }
195 
196     /***
197      * Returns the list.
198      * @return List
199      */
200     public List getList() {
201         return list;
202     }
203 
204     /***
205      * Sets the list.
206      * @param list The list to set
207      */
208     public void setList(List list) {
209         this.list = list;
210     }
211 
212     /***
213      * Returns the nested.
214      * @return NestedBean
215      */
216     public NestedBean getNested() {
217         return nested;
218     }
219 
220     /***
221      * Sets the nested.
222      * @param nested The nested to set
223      */
224     public void setNested(NestedBean nested) {
225         this.nested = nested;
226     }
227 
228     /***
229      * Returns the dateValue.
230      * @return java.util.Date
231      */
232     public java.util.Date getDateValue() {
233         return dateValue;
234     }
235 
236     /***
237      * Sets the dateValue.
238      * @param date The date to set
239      */
240     public void setDateValue(java.util.Date date) {
241         this.dateValue = date;
242     }
243 
244     /***
245      * Returns the array.
246      * @return String[]
247      */
248     public String[] getArray() {
249         return array;
250     }
251 
252     /***
253      * Sets the array.
254      * @param array The array to set
255      */
256     public void setArray(String[] array) {
257         this.array = array;
258     }
259 
260     /***
261      * Returns the html.
262      * @return String
263      */
264     public String getHtml() {
265         return html;
266     }
267 
268     /***
269      * Sets the html.
270      * @param html The html to set
271      */
272     public void setHtml(String html) {
273         this.html = html;
274     }
275 
276 }