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