KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > stests > appli > OrderDetail


1 package org.objectweb.jonas.stests.appli;
2
3 import java.io.Serializable JavaDoc;
4
5 /**
6  * Utility class to hold one line of an order.
7  */

8 public class OrderDetail implements Serializable JavaDoc {
9
10     //The ID of the item. should be six characters long e.g. '000001'
11
Integer JavaDoc itemID = null;
12
13     // The total cost of the order line. (i.e. qty * unit cost)
14
float itemAmount = 0;
15
16     // The number of items ordered.
17
int itemQty = 0;
18
19     /** The line number of the item on the order.
20      * This is set once the order is actually saved to the database.
21      */

22     int lineNumber = 0;
23
24
25     public OrderDetail(){
26         super();
27     }
28     
29     /**
30      * Create an OrderDetail object.
31      * @param itemID Integer Item ID.
32      * @param itemAmount float Total cost of the line. unit cost times the unit price.
33      * @param itemQty int Number of units of the item.
34      */

35     public OrderDetail ( Integer JavaDoc itemID, float itemAmount, int itemQty) {
36         this.itemID = itemID;
37         this.itemAmount = itemAmount;
38         this.itemQty = itemQty;
39     }
40     
41     /** @return String ID of the item ordered. */
42     public Integer JavaDoc getItemID() {
43         return itemID;
44     }
45     
46     /** @return BigDecimal Total cost of the order line. */
47     public float getItemAmount() {
48         return itemAmount;
49     }
50     
51     /** @return int Quanty of items ordered */
52     public int getItemQty() {
53         return itemQty;
54     }
55     
56     /** @return int Order line's line number. */
57     public int getLineNumber() {
58         return lineNumber;
59     }
60
61     /** @param ln int Order line number. */
62     public void setLineNumber(int ln) {
63         lineNumber = ln;
64     }
65     
66 }
67
Popular Tags