View Javadoc

1   /* $Id: SimpleTestBean.java 1102402 2011-05-12 18:03:26Z simonetripodi $
2    *
3    * Licensed to the Apache Software Foundation (ASF) under one or more
4    * contributor license agreements.  See the NOTICE file distributed with
5    * this work for additional information regarding copyright ownership.
6    * The ASF licenses this file to You under the Apache License, Version 2.0
7    * (the "License"); you may not use this file except in compliance with
8    * the License.  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 org.apache.commons.digester3;
20  
21  /**
22   * <p>
23   * As it's name suggests just a simple bean used for testing.
24   */
25  public class SimpleTestBean
26  {
27  
28      private String alpha;
29  
30      private String beta;
31  
32      private String gamma;
33  
34      private String delta;
35  
36      public String getAlpha()
37      {
38          return alpha;
39      }
40  
41      public void setAlpha( String alpha )
42      {
43          this.alpha = alpha;
44      }
45  
46      public String getBeta()
47      {
48          return beta;
49      }
50  
51      public void setBeta( String beta )
52      {
53          this.beta = beta;
54      }
55  
56      public String getGamma()
57      {
58          return gamma;
59      }
60  
61      public void setGamma( String gamma )
62      {
63          this.gamma = gamma;
64      }
65  
66      public String getDeltaValue()
67      { // Retrieves "write only" value
68          return delta;
69      }
70  
71      public void setDelta( String delta )
72      { // "delta" is a write-only property
73          this.delta = delta;
74      }
75  
76      public void setAlphaBeta( String alpha, String beta )
77      {
78          setAlpha( alpha );
79          setBeta( beta );
80      }
81  
82      @Override
83      public String toString()
84      {
85          StringBuilder sb = new StringBuilder( "[SimpleTestBean]" );
86          sb.append( " alpha=" );
87          sb.append( alpha );
88          sb.append( " beta=" );
89          sb.append( beta );
90          sb.append( " gamma=" );
91          sb.append( gamma );
92          sb.append( " delta=" );
93          sb.append( delta );
94  
95          return sb.toString();
96      }
97  }