01: package net.ar.webonswing.petstore.model;
02:
03: import java.io.*;
04: import java.util.*;
05:
06: public class Product implements Serializable {
07: protected String description;
08: protected Integer id;
09: protected Set items = new HashSet();
10: protected String name;
11: protected String productId;
12:
13: public Product() {
14: }
15:
16: public Product(String aProductId, String aName, String aDescription) {
17: productId = aProductId;
18: name = aName;
19: description = aDescription;
20: }
21:
22: public void addItem(Item anItem) {
23: items.add(anItem);
24: anItem.setProduct(this );
25: }
26:
27: public String getDescription() {
28: return description;
29: }
30:
31: public Integer getId() {
32: return id;
33: }
34:
35: public Set getItems() {
36: return items;
37: }
38:
39: public String getName() {
40: return name;
41: }
42:
43: public String getProductId() {
44: return productId;
45: }
46:
47: public void setDescription(String description) {
48: this .description = description;
49: }
50:
51: public void setId(Integer id) {
52: this .id = id;
53: }
54:
55: public void setItems(Set items) {
56: this .items = items;
57: }
58:
59: public void setName(String name) {
60: this .name = name;
61: }
62:
63: public void setProductId(String productId) {
64: this.productId = productId;
65: }
66: }
|