1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.commons.jelly.tags.bean;
17
18 import org.apache.commons.logging.Log;
19 import org.apache.commons.logging.LogFactory;
20
21 /***
22 * A sample bean that we can construct via Jelly tags
23 *
24 * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
25 * @version $Revision: 155420 $
26 */
27 public class Product {
28
29 /*** The Log to which logging calls will be made. */
30 private static final Log log = LogFactory.getLog(Product.class);
31
32 private String id;
33 private String name;
34
35 public Product() {
36 }
37
38 public String toString() {
39 return "Product[id=" + id + ";name=" + name + "]";
40 }
41
42
43
44 /***
45 * Returns the id.
46 * @return String
47 */
48 public String getId() {
49 return id;
50 }
51
52 /***
53 * Returns the name.
54 * @return String
55 */
56 public String getName() {
57 return name;
58 }
59
60 /***
61 * Sets the id.
62 * @param id The id to set
63 */
64 public void setId(String id) {
65 this.id = id;
66 }
67
68 /***
69 * Sets the name.
70 * @param name The name to set
71 */
72 public void setName(String name) {
73 this.name = name;
74 }
75
76 }