View Javadoc

1   /*
2    * @(#)PaymentData.java Jul 12, 2004
3    * 
4    * Copyright (c) 2003-2005 Delft University of Technology, Jaffalaan 5, 2628 BX
5    * Delft, the Netherlands. All rights reserved.
6    * 
7    * See for project information <a href="http://www.simulation.tudelft.nl/">
8    * www.simulation.tudelft.nl </a>.
9    * 
10   * The source code and binary code of this software is proprietary information
11   * of Delft University of Technology.
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.Payment;
18  
19  /***
20   * Contains data for a payment. This object is send to a client-side graphical
21   * user interface and is used to update information related to a payment.
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/alexandv/index.htm">Alexander
34   *         Verbraeck </a>
35   * @version $Revision: 1.1 $ $Date: 2005/06/16 12:33:55 $
36   * @since 1.0.0
37   */
38  public class PaymentData extends ContentData
39  {
40  	/*** the serial version uid */
41  	private static final long serialVersionUID = 11L;
42  
43  	/*** the bill to which this payment belongs */
44  	private BillData billData;
45  
46  	/*** the amount reflecting the payment */
47  	private double paidAmount;
48  
49  	/***
50  	 * @param payment the payment
51  	 * @param simulator the simulator
52  	 */
53  	public PaymentData(final Payment payment, final SimulatorInterface simulator)
54  	{
55  		super(payment.getSender().getName(), payment.getSender()
56  				.getLocationDescription(), payment.getReceiver().getName(),
57  				payment.getReceiver().getLocationDescription());
58  		this.paidAmount = payment.getPayment();
59  		this.billData = new BillData(payment.getBill(), simulator);
60  	}
61  
62  	/***
63  	 * @return Returns the billData.
64  	 */
65  	public BillData getBillData()
66  	{
67  		return this.billData;
68  	}
69  
70  	/***
71  	 * @return Returns the paidAmount.
72  	 */
73  	public double getPaidAmount()
74  	{
75  		return this.paidAmount;
76  	}
77  }