1
2
3
4
5
6
7
8
9
10
11
12
13
14 package org.gscg.singleuser.interactionlayer.dataobjects.content;
15
16 import nl.tudelft.simulation.dsol.simulators.SimulatorInterface;
17 import nl.tudelft.simulation.supplychain.content.OrderBasedOnQuote;
18
19 /***
20 * Contains data for an order. This object is send to a client-side graphical
21 * user interface and is used to update information related to an order.
22 * <p>
23 * Copyright (c) 2003-2005 Delft University of Technology, Jaffalaan 5, 2628 BX
24 * Delft, the Netherlands. All rights reserved.
25 *
26 * See for project information <a href="http://www.simulation.tudelft.nl/">
27 * www.simulation.tudelft.nl </a>.
28 *
29 * The source code and binary code of this software is proprietary information
30 * of Delft University of Technology.
31 *
32 * @author <a
33 * href="http://www.tbm.tudelft.nl/webstaf/stijnh/index.htm">Stijn-Pieter
34 * van Houten </a>
35 * @version $Revision: 1.1 $ $Date: 2005/06/16 12:33:56 $
36 * @since 1.0.0
37 */
38 public class OrderBasedOnQuoteData extends OrderData
39 {
40 /*** the serial version uid */
41 private static final long serialVersionUID = 11L;
42
43 /*** the Quote */
44 private QuoteData quoteData = null;
45
46 /***
47 * constructs a new OrderBasedOnQuoteData
48 *
49 * @param order the order to extract data from
50 * @param simulator the simulator
51 */
52 public OrderBasedOnQuoteData(final OrderBasedOnQuote order,
53 final SimulatorInterface simulator)
54 {
55 super(order, simulator);
56 this.quoteData = new QuoteData(order.getQuote(), simulator);
57 }
58
59 /***
60 * @return Returns the quoteData.
61 */
62 public QuoteData getQuoteData()
63 {
64 return this.quoteData;
65 }
66
67 /***
68 * @see org.gscg.singleuser.interactionlayer.dataobjects.content.OrderData#getAmount()
69 */
70 public double getAmount()
71 {
72 return this.quoteData.getAmount();
73 }
74
75 /***
76 * @see org.gscg.singleuser.interactionlayer.dataobjects.content.OrderData#getPrice()
77 */
78 public double getPrice()
79 {
80 return Math.round(this.quoteData.getPrice());
81 }
82
83 /***
84 * @see org.gscg.singleuser.interactionlayer.dataobjects.content.OrderData#getProductName()
85 */
86 public String getProductName()
87 {
88 return this.quoteData.getProductName();
89 }
90 }