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