com.ail.financial
Class PaymentSchedule

java.lang.Object
  extended by com.ail.core.Type
      extended by com.ail.financial.PaymentSchedule
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class PaymentSchedule
extends Type

A payment schedule simply groups together a collection of MoneyProvisions.

For example, a schedule might define:-
  1. A single payment of £30 to be made by direct debit; or
  2. A payment of £30 to be made by Master Card, followed by 10 monthly payments of £43 to be made by direct debit.

Version:
$Revision: 1.3 $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ail.core.Type
jXPathContext, NOT_PERSISTED
 
Constructor Summary
PaymentSchedule()
          Constructor
PaymentSchedule(java.util.ArrayList<MoneyProvision> moneyProvision, java.lang.String description)
           
 
Method Summary
 CurrencyAmount calculateTotal()
           
 java.lang.String getDescription()
          Getter returning the value of the description property.
 java.util.ArrayList<MoneyProvision> getMoneyProvision()
          Fetch the list of money provisions associated withe this schedule.
 void setDescription(java.lang.String description)
          Setter to update the value of the description property.
 void setMoneyProvision(java.util.ArrayList<MoneyProvision> moneyProvision)
          Set the list of money provisions associated with this schedule.
 
Methods inherited from class com.ail.core.Type
addAttribute, clone, deleteLock, deleteSerialVersion, fetchJXPathContext, getAttribute, getAttribute, getAttributeCount, getForeignSystemId, getLock, getSerialVersion, getSystemId, hasLock, hasSerialVersion, hasSystemId, isPersisted, markAsNotPersisted, mergeWithDataFrom, removeAttribute, removeAttribute, setAttribute, setForeignSystemId, setLock, setSerialVersion, setSystemId, xpathGet, xpathGet, xpathIterate, xpathSet
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PaymentSchedule

public PaymentSchedule(java.util.ArrayList<MoneyProvision> moneyProvision,
                       java.lang.String description)
Parameters:
moneyProvision - List of money provisions
description - Textual description

PaymentSchedule

public PaymentSchedule()
Constructor

Method Detail

getDescription

public java.lang.String getDescription()
Getter returning the value of the description property. A textual description of the reason for the payment.

Returns:
Value of the description property

setDescription

public void setDescription(java.lang.String description)
Setter to update the value of the description property. A textual description of the reason for the payment.

Parameters:
description - New value for the description property

getMoneyProvision

public java.util.ArrayList<MoneyProvision> getMoneyProvision()
Fetch the list of money provisions associated withe this schedule. This list will never be null.

Returns:
List of money provisions.

setMoneyProvision

public void setMoneyProvision(java.util.ArrayList<MoneyProvision> moneyProvision)
Set the list of money provisions associated with this schedule.

Parameters:
moneyProvision -

calculateTotal

public CurrencyAmount calculateTotal()