com.ail.insurance.policy
Class Totalizer
java.lang.Object
com.ail.core.Type
com.ail.insurance.policy.AssessmentLine
com.ail.insurance.policy.CalculationLine
com.ail.insurance.policy.Totalizer
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<AssessmentLine>
public class Totalizer
- extends CalculationLine
The totalizer calculation line adds any number of other named lines up to make a
total, and optionally contributes that total to another line.
- Version:
- $Revision: 1.4 $
- See Also:
- Serialized Form
|
Constructor Summary |
Totalizer()
|
Totalizer(java.lang.String id,
java.lang.String reason,
Reference relatesTo,
java.lang.String contributesTo,
java.lang.String dependsOn)
|
Totalizer(java.lang.String id,
java.lang.String reason,
Reference relatesTo,
java.lang.String contributesTo,
java.lang.String dependsOn,
int priority)
|
| Methods inherited from class com.ail.insurance.policy.AssessmentLine |
compareTo, getCalculatedOrder, getId, getOrigin, getPriority, getReason, getRelatesTo, isDisabled, setCalculatedOrder, setDisabled, setId, setOrigin, setPriority, setReason, setRelatesTo |
| 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 |
Totalizer
public Totalizer()
Totalizer
public Totalizer(java.lang.String id,
java.lang.String reason,
Reference relatesTo,
java.lang.String contributesTo,
java.lang.String dependsOn)
- Parameters:
id - This line's Idreason - Free text reson for this behaviour being created.relatesTo - Optional reference to the part of the policy that caused this behaviour.contributesTo - The Id of the line that this one will contribute to.dependsOn - A comma seperated list of the IDs of the lines that this one depends on (will sum).
Totalizer
public Totalizer(java.lang.String id,
java.lang.String reason,
Reference relatesTo,
java.lang.String contributesTo,
java.lang.String dependsOn,
int priority)
- Parameters:
id - This line's Idreason - Free text reson for this behaviour being created.relatesTo - Optional reference to the part of the policy that caused this behaviour.contributesTo - The Id of the line that this one will contribute to.dependsOn - A comma seperated list of the IDs of the lines that this one depends on (will sum).priority - The priority of this line wrt other lines in the same sheet (lines with higher priority values are processed first)
getDependsOn
public java.lang.String getDependsOn()
- Get the Ids of the lines that this totalizer depends on. The Ids
are returned as a comma seperated list.
- Returns:
- List of the IDs of the lines that this line depends on.
setDependsOn
public void setDependsOn(java.lang.String dependsOn)
- Set the Ids of the lines that this totalizer depends on. The Ids
are passed as a comma seperated list.
- Parameters:
dependsOn - List of the IDs of the lines that this line depends on.
calculate
public boolean calculate(AssessmentSheetList sheets,
AssessmentSheet sheet)
- Description copied from class:
CalculationLine
- Process this line's calculation
- Specified by:
calculate in class CalculationLine
- Parameters:
sheets - The list of assessment sheets currently being processed.sheet - The sheet this line is part of.
- Returns:
- true if the line gets processed, false otherwise.