01: /*
02: * Copyright 2004-2005 Fouad HAMDI.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16:
17: package org.csvbeans.samples.quickstart;
18:
19: /**
20: * Product bean.
21: *
22: * @author Fouad Hamdi
23: *
24: */
25: public class Product {
26: private String id;
27:
28: private String name;
29:
30: private Quantity quantity;
31:
32: /**
33: * Constructor.
34: */
35: public Product() {
36: }
37:
38: /**
39: * Return the product identifier.
40: */
41: public String getId() {
42: return id;
43: }
44:
45: /**
46: * Define the product identifier.
47: */
48: public void setId(String id) {
49: this .id = id;
50: }
51:
52: /**
53: * Return the product name.
54: */
55: public String getName() {
56: return name;
57: }
58:
59: /**
60: * Define the product name.
61: */
62: public void setName(String name) {
63: this .name = name;
64: }
65:
66: /**
67: * Return the product quantity.
68: */
69: public Quantity getQuantity() {
70: return quantity;
71: }
72:
73: /**
74: * Define the product quantity.
75: */
76: public void setQuantity(Quantity quantity) {
77: this .quantity = quantity;
78: }
79:
80: /**
81: * Return a description of the product.
82: */
83: public String toString() {
84: return id + " - " + name + " - " + quantity;
85: }
86: }
|