01: /*-
02: * See the file LICENSE for redistribution information.
03: *
04: * Copyright (c) 2002,2008 Oracle. All rights reserved.
05: *
06: * $Id: Shipment.java,v 1.10.2.2 2008/01/07 15:14:00 cwl Exp $
07: */
08:
09: package 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: */
21: public class Shipment {
22:
23: private String partNumber;
24: private String supplierNumber;
25: private int quantity;
26:
27: public Shipment(String partNumber, String supplierNumber,
28: int quantity) {
29:
30: this .partNumber = partNumber;
31: this .supplierNumber = supplierNumber;
32: this .quantity = quantity;
33: }
34:
35: public final String getPartNumber() {
36:
37: return partNumber;
38: }
39:
40: public final String getSupplierNumber() {
41:
42: return supplierNumber;
43: }
44:
45: public final int getQuantity() {
46:
47: return quantity;
48: }
49:
50: public String toString() {
51:
52: return "[Shipment: part=" + partNumber + " supplier="
53: + supplierNumber + " quantity=" + quantity + ']';
54: }
55: }
|