01: /*-
02: * See the file LICENSE for redistribution information.
03: *
04: * Copyright (c) 2002,2008 Oracle. All rights reserved.
05: *
06: * $Id: SupplierData.java,v 1.12.2.2 2008/01/07 15:14:00 cwl Exp $
07: */
08:
09: package collections.ship.entity;
10:
11: import java.io.Serializable;
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 {
25:
26: private String name;
27: private int status;
28: private String city;
29:
30: public SupplierData(String name, int status, String city) {
31:
32: this .name = name;
33: this .status = status;
34: this .city = city;
35: }
36:
37: public final String getName() {
38:
39: return name;
40: }
41:
42: public final int getStatus() {
43:
44: return status;
45: }
46:
47: public final String getCity() {
48:
49: return city;
50: }
51:
52: public String toString() {
53:
54: return "[SupplierData: name=" + name + " status=" + status
55: + " city=" + city + ']';
56: }
57: }
|