01: package net.ar.webonswing.petstore.model;
02:
03: import java.io.*;
04: import java.util.*;
05:
06: public class Category implements Serializable {
07: protected String description;
08: protected Integer id;
09: protected String name;
10: protected Set products = new HashSet();
11:
12: public Category() {
13: }
14:
15: public Category(String aName, String aDescription) {
16: name = aName;
17: description = aDescription;
18: }
19:
20: public void addProduct(Product aProduct) {
21: products.add(aProduct);
22: }
23:
24: public String getDescription() {
25: return description;
26: }
27:
28: public Integer getId() {
29: return id;
30: }
31:
32: public String getName() {
33: return name;
34: }
35:
36: public Set getProducts() {
37: return products;
38: }
39:
40: public void setDescription(String description) {
41: this .description = description;
42: }
43:
44: public void setId(Integer id) {
45: this .id = id;
46: }
47:
48: public void setName(String name) {
49: this .name = name;
50: }
51:
52: public void setProducts(Set products) {
53: this.products = products;
54: }
55: }
|