1/*-
2 * See the file LICENSE for redistribution information.
3 *
4 * Copyright (c) 2002,2008 Oracle.  All rights reserved.
5 *
6 * $Id: Shipment.java,v 12.7 2008/01/08 20:58:29 bostic Exp $
7 */
8
9package collections.ship.entity;
10
11/**
12 * A Shipment represents the combined key/data pair for a shipment entity.
13 *
14 * <p> In this sample, Shipment is created from the stored key/data entry
15 * using a SerialSerialBinding.  See {@link SampleViews.ShipmentBinding} for
16 * details.  Since this class is not used directly for data storage, it does
17 * not need to be Serializable. </p>
18 *
19 * @author Mark Hayes
20 */
21public class Shipment {
22
23    private String partNumber;
24    private String supplierNumber;
25    private int quantity;
26
27    public Shipment(String partNumber, String supplierNumber, int quantity) {
28
29        this.partNumber = partNumber;
30        this.supplierNumber = supplierNumber;
31        this.quantity = quantity;
32    }
33
34    public final String getPartNumber() {
35
36        return partNumber;
37    }
38
39    public final String getSupplierNumber() {
40
41        return supplierNumber;
42    }
43
44    public final int getQuantity() {
45
46        return quantity;
47    }
48
49    public String toString() {
50
51        return "[Shipment: part=" + partNumber +
52                " supplier=" + supplierNumber +
53                " quantity=" + quantity + ']';
54    }
55}
56