1
2
3
4
5
6
7
8
9
10
11
12
13
14 package org.gscg.singleuser.interactionlayer.dataobjects.content;
15
16 import java.io.Serializable;
17
18 import org.gscg.singleuser.interactionlayer.dataobjects.DateIntData;
19
20 /***
21 * Contains data for a quote. This object is sent by a client-side graphical
22 * user interface and is used to contain information related to a quote.
23 * <p>
24 * Copyright (c) 2003-2005 Delft University of Technology, Jaffalaan 5, 2628 BX
25 * Delft, the Netherlands. All rights reserved.
26 *
27 * See for project information <a href="http://www.simulation.tudelft.nl/">
28 * www.simulation.tudelft.nl </a>.
29 *
30 * The source code and binary code of this software is proprietary information
31 * of Delft University of Technology.
32 *
33 * @author <a
34 * href="http://www.tbm.tudelft.nl/webstaf/stijnh/index.htm">Stijn-Pieter
35 * van Houten </a>
36 * @version $Revision: 1.1 $ $Date: 2005/06/16 12:33:56 $
37 * @since 1.0.0
38 */
39 public class SentQuoteData extends ContentData implements Serializable
40 {
41 /*** the serial version uid */
42 private static final long serialVersionUID = 11L;
43
44 /*** the RFQ */
45 private RFQData rfqData = null;
46
47 /*** the proposed delivery */
48 private DateIntData proposedDelivery = null;
49
50 /*** the amount */
51 private double amount = 0;
52
53 /*** the product name */
54 private String productName = null;
55
56 /*** the proposed price */
57 private double price = 0.0;
58
59 /***
60 * constructs a new SentQuoteData
61 *
62 * @param rfqData the rfqData
63 * @param proposedDelivery the delivery date
64 * @param amount the amount
65 * @param price the price
66 */
67 public SentQuoteData(final RFQData rfqData,
68 final DateIntData proposedDelivery, final double amount,
69 final double price)
70 {
71 super(rfqData.getReceiverName(), rfqData
72 .getReceiverLocationDescription(), rfqData.getSenderName(),
73 rfqData.getSenderLocationDescription());
74 this.rfqData = rfqData;
75 this.proposedDelivery = proposedDelivery;
76 this.amount = amount;
77 this.productName = rfqData.getProductName();
78 this.price = price;
79 }
80
81 /***
82 * @return Returns the amount.
83 */
84 public double getAmount()
85 {
86 return this.amount;
87 }
88
89 /***
90 * @return Returns the price.
91 */
92 public double getPrice()
93 {
94 return Math.round(this.price);
95 }
96
97 /***
98 * @return Returns the productName.
99 */
100 public String getProductName()
101 {
102 return this.productName;
103 }
104
105 /***
106 * @return Returns the proposedDelivery.
107 */
108 public DateIntData getProposedDelivery()
109 {
110 return this.proposedDelivery;
111 }
112
113 /***
114 * @return Returns the rfqData.
115 */
116 public RFQData getRfqData()
117 {
118 return this.rfqData;
119 }
120 }