KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > collections > ship > entity > SupplierData


1 /*-
2  * See the file LICENSE for redistribution information.
3  *
4  * Copyright (c) 2002,2006 Oracle. All rights reserved.
5  *
6  * $Id: SupplierData.java,v 1.12 2006/10/30 21:13:58 bostic Exp $
7  */

8
9 package collections.ship.entity;
10
11 import java.io.Serializable JavaDoc;
12
13 /**
14  * A SupplierData serves as the value in the key/value pair for a supplier
15  * entity.
16  *
17  * <p> In this sample, SupplierData is used only as the storage data for the
18  * value, while the Supplier object is used as the value's object
19  * representation. Because it is used directly as storage data using
20  * serial format, it must be Serializable. </p>
21  *
22  * @author Mark Hayes
23  */

24 public class SupplierData implements Serializable JavaDoc {
25
26     private String JavaDoc name;
27     private int status;
28     private String JavaDoc city;
29
30     public SupplierData(String JavaDoc name, int status, String JavaDoc city) {
31
32         this.name = name;
33         this.status = status;
34         this.city = city;
35     }
36
37     public final String JavaDoc getName() {
38
39         return name;
40     }
41
42     public final int getStatus() {
43
44         return status;
45     }
46
47     public final String JavaDoc getCity() {
48
49         return city;
50     }
51
52     public String JavaDoc toString() {
53
54         return "[SupplierData: name=" + name +
55         " status=" + status +
56         " city=" + city + ']';
57     }
58 }
59
Popular Tags