1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.commons.jelly.util;
17
18 import java.util.ArrayList;
19 import java.util.Iterator;
20 import java.util.List;
21
22 /***
23 * A sample bean that we can construct via Jelly tags
24 *
25 * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
26 * @version $Revision: 1.1 $
27 */
28 public class Customer {
29
30 private String name;
31 private String city;
32 private String location;
33
34
35 public Customer() {
36 }
37
38 public Customer(String name) {
39 setName(name);
40 }
41
42 public Customer(String name, String city) {
43 setName(name);
44 setCity(city);
45 }
46
47 public Customer(Customer cust) {
48 setName(cust.getName());
49 setCity(cust.getCity());
50 setLocation(cust.getLocation());
51 }
52
53 public String toString() {
54 return super.toString() + "[name=" + name + ";city=" + city + "]";
55 }
56
57 /***
58 * Returns the city.
59 * @return String
60 */
61 public String getCity() {
62 return city;
63 }
64
65 /***
66 * Returns the location.
67 * @return String
68 */
69 public String getLocation() {
70 return location;
71 }
72
73 /***
74 * Returns the name.
75 * @return String
76 */
77 public String getName() {
78 return name;
79 }
80
81 /***
82 * Sets the city.
83 * @param city The city to set
84 */
85 public void setCity(String city) {
86 this.city = city;
87 }
88
89 /***
90 * Sets the location.
91 * @param location The location to set
92 */
93 public void setLocation(String location) {
94 this.location = location;
95 }
96
97 /***
98 * Sets the name.
99 * @param name The name to set
100 */
101 public void setName(String name) {
102 this.name = name;
103 }
104 }