01: /*
02: * Copyright 2001-2004 The Apache Software Foundation.
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 samples.userguide.example5;
18:
19: /** This is a JavaBean which represents an order for some products.
20: *
21: * @author Glen Daniels (gdaniels@apache.org)
22: */
23: public class Order {
24: /** Who's ordering */
25: private String customerName;
26: /** Where do they live */
27: private String shippingAddress;
28: /** Which items do we want */
29: private String itemCodes[];
30: /** And how many */
31: private int quantities[];
32:
33: // Bean accessors
34:
35: public String getCustomerName() {
36: return customerName;
37: }
38:
39: public void setCustomerName(String name) {
40: customerName = name;
41: }
42:
43: public String getShippingAddress() {
44: return shippingAddress;
45: }
46:
47: public void setShippingAddress(String address) {
48: shippingAddress = address;
49: }
50:
51: public String[] getItemCodes() {
52: return itemCodes;
53: }
54:
55: public void setItemCodes(String[] items) {
56: itemCodes = items;
57: }
58:
59: public int[] getQuantities() {
60: return quantities;
61: }
62:
63: public void setQuantities(int[] quants) {
64: quantities = quants;
65: }
66: }
|