• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/db-4.7.25.NC/examples_java/src/collections/ship/tuple/
1/*-
2 * See the file LICENSE for redistribution information.
3 *
4 * Copyright (c) 2002,2008 Oracle.  All rights reserved.
5 *
6 * $Id: ShipmentKey.java,v 12.7 2008/01/08 20:58:31 bostic Exp $
7 */
8
9package collections.ship.tuple;
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 */
20public 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 +
44	    " part=" + partNumber + ']';
45    }
46}
47