01: /*-
02: * See the file LICENSE for redistribution information.
03: *
04: * Copyright (c) 2002,2008 Oracle. All rights reserved.
05: *
06: * $Id: ShipmentKey.java,v 1.11.2.2 2008/01/07 15:14:02 cwl Exp $
07: */
08:
09: package collections.ship.sentity;
10:
11: /**
12: * A ShipmentKey serves as the key in the key/data pair for a shipment entity.
13: *
14: * <p> In this sample, ShipmentKey is bound to the key's tuple storage entry
15: * using a TupleBinding. Because it is not used directly as storage data, it
16: * does not need to be Serializable. </p>
17: *
18: * @author Mark Hayes
19: */
20: public class ShipmentKey {
21:
22: private String partNumber;
23: private String supplierNumber;
24:
25: public ShipmentKey(String partNumber, String supplierNumber) {
26:
27: this .partNumber = partNumber;
28: this .supplierNumber = supplierNumber;
29: }
30:
31: public final String getPartNumber() {
32:
33: return partNumber;
34: }
35:
36: public final String getSupplierNumber() {
37:
38: return supplierNumber;
39: }
40:
41: public String toString() {
42:
43: return "[ShipmentKey: supplier=" + supplierNumber + " part="
44: + partNumber + ']';
45: }
46: }
|