| 1 |
/* |
| 2 |
* Copyright 2001-2004 The Apache Software Foundation. |
| 3 |
* |
| 4 |
* Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 |
* you may not use this file except in compliance with the License. |
| 6 |
* You may obtain a copy of the License at |
| 7 |
* |
| 8 |
* http://www.apache.org/licenses/LICENSE-2.0 |
| 9 |
* |
| 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 ([email protected]) |
| 22 |
*/ |
| 23 |
public class Order |
| 24 |
{ |
| 25 |
/** Who's ordering */ |
| 26 |
private String customerName; |
| 27 |
/** Where do they live */ |
| 28 |
private String shippingAddress; |
| 29 |
/** Which items do we want */ |
| 30 |
private String itemCodes[]; |
| 31 |
/** And how many */ |
| 32 |
private int quantities[]; |
| 33 |
|
| 34 |
// Bean accessors |
| 35 |
|
| 36 |
public String getCustomerName() |
| 37 |
{ return customerName; } |
| 38 |
public void setCustomerName(String name) |
| 39 |
{ customerName = name; } |
| 40 |
|
| 41 |
public String getShippingAddress() |
| 42 |
{ return shippingAddress; } |
| 43 |
public void setShippingAddress(String address) |
| 44 |
{ shippingAddress = address; } |
| 45 |
|
| 46 |
public String [] getItemCodes() |
| 47 |
{ return itemCodes; } |
| 48 |
public void setItemCodes(String [] items) |
| 49 |
{ itemCodes = items; } |
| 50 |
|
| 51 |
public int [] getQuantities() |
| 52 |
{ return quantities; } |
| 53 |
public void setQuantities(int [] quants) |
| 54 |
{ quantities = quants; } |
| 55 |
} |