View Javadoc

1   /*
2    * $Id: TestBean.java 289708 2005-09-17 05:55:45Z sraeburn $
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;
20  
21  import java.io.Serializable;
22  
23  
24  /***
25   * An example bean for Bean Examples
26   *
27   * @version $Rev: 289708 $ $Date: 2005-09-16 22:55:45 -0700 (Fri, 16 Sep 2005) $
28   */
29  public class TestBean implements Serializable {
30  
31      // ------------------------------------------------------ Instance Variables
32  
33      /*** A boolean value */
34      private boolean booleanValue = false;
35  
36      /*** A double value */
37      private double doubleValue = 45213.451;
38  
39      /*** A float value */
40      private float floatValue = -123.582F;
41  
42      /*** An integer value */
43      private int intValue = 256;
44  
45      /*** A long integer value */
46      private long longValue = 1321546L;
47  
48      /*** A short integer value */
49      private short shortValue = 257;
50  
51      /*** A string value */
52      private String stringValue = "Hello, world!";
53  
54      /*** A dateValue value */
55      private java.util.Date dateValue = new java.util.Date();
56  
57      // ------------------------------------------------------------ Constructors
58  
59      /***
60       * Constructor for TestBean.
61       */
62      public TestBean() {
63          super();
64      }
65  
66      // -------------------------------------------------------------- Properties
67  
68      /***
69       * Returns the booleanValue.
70       * @return boolean
71       */
72      public boolean isBooleanValue() {
73          return booleanValue;
74      }
75  
76      /***
77       * Returns the doubleValue.
78       * @return double
79       */
80      public double getDoubleValue() {
81          return doubleValue;
82      }
83  
84      /***
85       * Returns the floatValue.
86       * @return float
87       */
88      public float getFloatValue() {
89          return floatValue;
90      }
91  
92      /***
93       * Returns the intValue.
94       * @return int
95       */
96      public int getIntValue() {
97          return intValue;
98      }
99  
100     /***
101      * Returns the longValue.
102      * @return long
103      */
104     public long getLongValue() {
105         return longValue;
106     }
107 
108     /***
109      * Returns the shortValue.
110      * @return short
111      */
112     public short getShortValue() {
113         return shortValue;
114     }
115 
116     /***
117      * Returns the stringValue.
118      * @return String
119      */
120     public String getStringValue() {
121         return stringValue;
122     }
123 
124     /***
125      * Sets the booleanValue.
126      * @param booleanValue The booleanValue to set
127      */
128     public void setBooleanValue(boolean booleanValue) {
129         this.booleanValue = booleanValue;
130     }
131 
132     /***
133      * Sets the doubleValue.
134      * @param doubleValue The doubleValue to set
135      */
136     public void setDoubleValue(double doubleValue) {
137         this.doubleValue = doubleValue;
138     }
139 
140     /***
141      * Sets the floatValue.
142      * @param floatValue The floatValue to set
143      */
144     public void setFloatValue(float floatValue) {
145         this.floatValue = floatValue;
146     }
147 
148     /***
149      * Sets the intValue.
150      * @param intValue The intValue to set
151      */
152     public void setIntValue(int intValue) {
153         this.intValue = intValue;
154     }
155 
156     /***
157      * Sets the longValue.
158      * @param longValue The longValue to set
159      */
160     public void setLongValue(long longValue) {
161         this.longValue = longValue;
162     }
163 
164     /***
165      * Sets the shortValue.
166      * @param shortValue The shortValue to set
167      */
168     public void setShortValue(short shortValue) {
169         this.shortValue = shortValue;
170     }
171 
172     /***
173      * Sets the stringValue.
174      * @param stringValue The stringValue to set
175      */
176     public void setStringValue(String stringValue) {
177         this.stringValue = stringValue;
178     }
179 
180     /***
181      * Returns the dateValue.
182      * @return java.util.Date
183      */
184     public java.util.Date getDateValue() {
185         return dateValue;
186     }
187 
188     /***
189      * Sets the dateValue.
190      * @param date The date to set
191      */
192     public void setDateValue(java.util.Date date) {
193         this.dateValue = date;
194     }
195 
196 }