|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ail.core.Type
com.ail.insurance.policy.AssessmentSheet
public class AssessmentSheet
Groups together a collection of assessment lines and provides utility methods for manipulating them.
| Field Summary |
|---|
| Fields inherited from class com.ail.core.Type |
|---|
jXPathContext, NOT_PERSISTED |
| Constructor Summary | |
|---|---|
AssessmentSheet()
Default constructor |
|
| Method Summary | ||
|---|---|---|
void |
addAssessmentNote(java.lang.String reason,
Reference relatesTo)
Add an assessment note to this sheet. |
|
void |
addAssessmentNote(java.lang.String id,
java.lang.String reason,
Reference relatesTo)
Add an assessment note to this sheet. |
|
void |
addDecline(java.lang.String reason,
Reference relatesTo)
Same as addDecline, but automatically generates a line id |
|
void |
addDecline(java.lang.String id,
java.lang.String reason,
Reference relatesTo)
Add a decline line to this sheet. |
|
void |
addDiscount(java.lang.String reason,
Reference relatesTo,
java.lang.String contributesTo,
java.lang.String dependsOn,
Rate rate)
Same as addDiscount, but generates the line id automatically. |
|
void |
addDiscount(java.lang.String reason,
Reference relatesTo,
java.lang.String contributesTo,
java.lang.String dependsOn,
Rate rate,
int priority)
Same as addDiscount, but generates the line id automatically. |
|
void |
addDiscount(java.lang.String id,
java.lang.String reason,
Reference relatesTo,
java.lang.String contributesTo,
java.lang.String dependsOn,
Rate rate)
Add a rate based dicount entry to the sheet. |
|
void |
addFixedSum(java.lang.String reason,
Reference relatesTo,
java.lang.String contributesTo,
CurrencyAmount amount)
Same as addFixedSum, but generates a line id automatically. |
|
void |
addFixedSum(java.lang.String reason,
Reference relatesTo,
java.lang.String contributesTo,
CurrencyAmount amount,
int priority)
Same as addFixedSum, but generates a line id automatically. |
|
void |
addFixedSum(java.lang.String id,
java.lang.String reason,
Reference relatesTo,
java.lang.String contributesTo,
CurrencyAmount amount)
Add a fixed sum line to this sheet. |
|
void |
addFixedSum(java.lang.String id,
java.lang.String reason,
Reference relatesTo,
java.lang.String contributesTo,
CurrencyAmount amount,
int priority)
Add a fixed sum line to this sheet. |
|
void |
addLine(AssessmentLine line)
Add a line to the collection associated with this object. |
|
void |
addLoading(java.lang.String reason,
Reference relatesTo,
java.lang.String contributesTo,
java.lang.String dependsOn,
Rate rate)
Add a loading with a generated lineId, and the specified arguments. |
|
void |
addLoading(java.lang.String reason,
Reference relatesTo,
java.lang.String contributesTo,
java.lang.String dependsOn,
Rate rate,
int priority)
Add a loading with a generated lineId, and the specified arguments. |
|
void |
addLoading(java.lang.String id,
java.lang.String reason,
Reference relatesTo,
java.lang.String contributesTo,
java.lang.String dependsOn,
Rate rate)
Add a rate based loading entry to the sheet. |
|
void |
addReferral(java.lang.String reason,
Reference relatesTo)
Same as addReferral, but automatically generates the line id. |
|
void |
addReferral(java.lang.String id,
java.lang.String reason,
Reference relatesTo)
Add a referral line to this sheet. |
|
void |
clearLockingActor()
Unlock the assessment sheet - set locking actor to null. |
|
java.lang.Object |
clone()
Clone this object. |
|
void |
disableLine(AssessmentLine line)
Disable the specified line. |
|
void |
disableLine(java.lang.String id)
Disable the specified line. |
|
void |
enableLine(AssessmentLine line)
Enable the specified line. |
|
void |
enableLine(java.lang.String id)
Enable the specified line. |
|
AssessmentLine |
findLineById(java.lang.String id)
Fetch a named entry from the sheet. |
|
MarkerResolution |
findResolutionByMarkerId(java.lang.String id)
Find and return the resolution for a marker. |
|
int |
generateAutoPriority()
Return the next auto priority. |
|
java.lang.String |
generateLineId()
Generate a unique lineId. |
|
java.util.Map<java.lang.String,AssessmentLine> |
getAssessmentLine()
Get a list of the assessment lines associated with this sheet as a Map keyed on the line IDs. |
|
java.util.Map<java.lang.String,AssessmentLine> |
getAssessmentList()
Deprecated. use getAssessmentLine() instead. |
|
int |
getAutoPriority()
When lines are added to the assessment sheet the caller may or may not give them a specific priority (which is used to order the lines during processing). |
|
java.util.Collection<AssessmentLine> |
getDisabledLine()
Fetch a collection of the disabled line objects associated with this instance. |
|
int |
getDisabledLineCount()
Fetch a count of the number of disabled line objects associated with this instance. |
|
java.util.Collection<AssessmentLine> |
getEnabledLine()
Fetch a collection of all the line objects associated with this instance. |
|
int |
getEnabledLineCount()
Fetch a count of the number of line objects associated with this instance. |
|
java.util.Collection<AssessmentLine> |
getLine()
Fetch the collection of line objects associated with this instance. |
|
int |
getLineCount()
Fetch a count of the number of line objects associated with this instance. |
|
|
getLinesOfType(java.lang.Class<T> clazz)
Get a hashtable of all the lines in the sheet of a specific type. |
|
java.lang.String |
getLockingActor()
Getter returning the value of the lockingActor property. |
|
boolean |
isMarkedForDecline()
Determine if the sheet is marked for decline or not. |
|
boolean |
isMarkedForRefer()
Determine if the sheet is marked for referral or not. |
|
boolean |
isMarkedForSubjectivity()
Determine if the sheet includes an unresolved subjectivity. |
|
void |
removeLine(AssessmentLine line)
Remove a specific instance of AssessmentLine from the collection associated with this object. |
|
void |
removeLinesByOrigin(java.lang.String origin)
Remove the lines "owned" (or created) by an actor. |
|
void |
setAssessmentLine(java.util.Map<java.lang.String,AssessmentLine> assessmentLine)
Set the lines associated with this sheet to the values defined in a Map. |
|
void |
setAssessmentList(java.util.Map<java.lang.String,AssessmentLine> assessmentLine)
Deprecated. use setAssessmentLine(Map) instead. |
|
void |
setAutoPriority(int autoPriority)
|
|
void |
setLine(java.util.Collection<AssessmentLine> line)
Set the collection of AssessmentLines associated with this sheet. |
|
void |
setLockingActor(java.lang.String lockingActor)
Setter to update the value of the lockingActor property. |
|
| Methods inherited from class com.ail.core.Type |
|---|
addAttribute, 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 |
|---|
public AssessmentSheet()
| Method Detail |
|---|
public <T> java.util.Hashtable<java.lang.String,T> getLinesOfType(java.lang.Class<T> clazz)
clazz - The type to search for.
public java.util.Collection<AssessmentLine> getLine()
disabled lines. Use getEnabledLine to fetch
only those that are enabled.
public java.util.Map<java.lang.String,AssessmentLine> getAssessmentList()
getAssessmentLine() instead.
public void setAssessmentList(java.util.Map<java.lang.String,AssessmentLine> assessmentLine)
setAssessmentLine(Map) instead.
assessmentLine - public java.util.Map<java.lang.String,AssessmentLine> getAssessmentLine()
public void setAssessmentLine(java.util.Map<java.lang.String,AssessmentLine> assessmentLine)
assessmentLine - New values.public java.util.Collection<AssessmentLine> getEnabledLine()
disabled lines. Use getLine to fetch
all line.
public java.util.Collection<AssessmentLine> getDisabledLine()
disabled line objects associated with this instance.
public void setLine(java.util.Collection<AssessmentLine> line)
line - Collection of AssessmentLines.public int getLineCount()
getEnabledLineCount
to get a count of the enabled lines only.public int getEnabledLineCount()
getLineCount
to get a count of all lines.
public int getDisabledLineCount()
public void addLine(AssessmentLine line)
line - Instance of AssessmentLine to add.
java.lang.IllegalStateException - If line.origin is null and this sheet is not locked to an actor.
DuplicateAssessmentLineError - If a line with the same id as line is already in the sheetpublic void removeLine(AssessmentLine line)
line - Object to be removed from the collection.public void disableLine(java.lang.String id)
id - The id of the line to disable.
java.lang.IllegalStateException - If the specified line does not exist.public void disableLine(AssessmentLine line)
line - The line to disable.public void enableLine(java.lang.String id)
id - The id of the line to enabled.
java.lang.IllegalStateException - If the specified line does not exist.public void enableLine(AssessmentLine line)
line - The line to enable.public void removeLinesByOrigin(java.lang.String origin)
origin - Name of the origin to remove lines forpublic AssessmentLine findLineById(java.lang.String id)
disabled lines.
id - The id of the entry to return
public MarkerResolution findResolutionByMarkerId(java.lang.String id)
Disabled lines are
ignored by this method.
id - Marker's id
public boolean isMarkedForDecline()
Disabled
lines are ignored by this method.
public boolean isMarkedForRefer()
Disabled
lines are ignored by this method.
public boolean isMarkedForSubjectivity()
subjectivity
are found, that are not resolved. Disabled
lines are ignored by this method.
public java.lang.String generateLineId()
public int generateAutoPriority()
public void addLoading(java.lang.String id,
java.lang.String reason,
Reference relatesTo,
java.lang.String contributesTo,
java.lang.String dependsOn,
Rate rate)
RateBehaviour instance with the arguments
supplied and adds that instance to the sheet as a new line.The suggested rule syntax is:
Load by {rate} of {dependsOn} to {contributesTo} because {reason}. This relates to {relatesTo}. Use id {id}.
Note: Lines added using this methods are automatically assigned a priority based on the order they are added.
id - The Id to use for this linereason - 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 cntributes to.dependsOn - The Id of the line that this on is derived from.rate - The rate to be used in the calculation.
public void addLoading(java.lang.String reason,
Reference relatesTo,
java.lang.String contributesTo,
java.lang.String dependsOn,
Rate rate)
reason - 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 cntributes to.dependsOn - The Id of the line that this on is derived from.rate - The rate to be used in the calculation.
public void addLoading(java.lang.String reason,
Reference relatesTo,
java.lang.String contributesTo,
java.lang.String dependsOn,
Rate rate,
int priority)
reason - 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 cntributes to.dependsOn - The Id of the line that this on is derived from.rate - The rate to be used in the calculation.priority - The priority of this line wrt other lines in this sheet (low value=low priority)
public void addDiscount(java.lang.String id,
java.lang.String reason,
Reference relatesTo,
java.lang.String contributesTo,
java.lang.String dependsOn,
Rate rate)
RateBehaviour instance with the arguments
supplied and adds that instance to the sheet as a new line.
id - The Id to use for this linereason - Free text reson for this discount being created.relatesTo - Optional reference to the part of the policy that caused this discount.contributesTo - The Id of the line that this one contributes to.dependsOn - The Id of the line that this on is derived from.rate - The rate to be used in the calculation.
public void addDiscount(java.lang.String reason,
Reference relatesTo,
java.lang.String contributesTo,
java.lang.String dependsOn,
Rate rate)
reason - Free text reson for this discount being created.relatesTo - Optional reference to the part of the policy that caused this discount.contributesTo - The Id of the line that this one contributes to.dependsOn - The Id of the line that this on is derived from.rate - The rate to be used in the calculation.addDiscount(java.lang.String, java.lang.String, com.ail.insurance.policy.Reference, java.lang.String, java.lang.String, com.ail.util.Rate)
public void addDiscount(java.lang.String reason,
Reference relatesTo,
java.lang.String contributesTo,
java.lang.String dependsOn,
Rate rate,
int priority)
reason - Free text reson for this discount being created.relatesTo - Optional reference to the part of the policy that caused this discount.contributesTo - The Id of the line that this one contributes to.dependsOn - The Id of the line that this on is derived from.rate - The rate to be used in the calculation.priority - The priority of this line wrt other lines in this sheet (low value=low priority)addDiscount(java.lang.String, java.lang.String, com.ail.insurance.policy.Reference, java.lang.String, java.lang.String, com.ail.util.Rate)
public void addReferral(java.lang.String id,
java.lang.String reason,
Reference relatesTo)
Marker instance with the arguments supplied and adds it to
the sheet as a new line.
id - The Id to use for this linereason - Free text reson for this referral being created.relatesTo - Optional reference to the part of the policy that caused referral.
public void addReferral(java.lang.String reason,
Reference relatesTo)
reason - Free text reson for this referral being created.relatesTo - Optional reference to the part of the policy that caused referral.addReferral(java.lang.String, java.lang.String, com.ail.insurance.policy.Reference)
public void addDecline(java.lang.String id,
java.lang.String reason,
Reference relatesTo)
Marker instance with the arguments supplied and adds it to
the sheet as a new line.
id - The Id to use for this linereason - Free text reson for this decline being created.relatesTo - Optional reference to the part of the policy that caused decline line.
public void addDecline(java.lang.String reason,
Reference relatesTo)
reason - Free text reson for this decline being created.relatesTo - Optional reference to the part of the policy that caused decline line.addDecline(java.lang.String, java.lang.String, com.ail.insurance.policy.Reference)
public void addFixedSum(java.lang.String id,
java.lang.String reason,
Reference relatesTo,
java.lang.String contributesTo,
CurrencyAmount amount)
FixedSum instance using the arguments supplied and adds
it to the sheet as a new line.
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.amount - The amount to be contributed.
public void addFixedSum(java.lang.String id,
java.lang.String reason,
Reference relatesTo,
java.lang.String contributesTo,
CurrencyAmount amount,
int priority)
FixedSum instance using the arguments supplied and adds
it to the sheet as a new line.
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.amount - The amount to be contributed.#priority - The priority of this line wrt other lines in this sheet (low value=low priority)
public void addFixedSum(java.lang.String reason,
Reference relatesTo,
java.lang.String contributesTo,
CurrencyAmount amount)
reason - 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.amount - The amount to be contributed.addFixedSum(java.lang.String, java.lang.String, com.ail.insurance.policy.Reference, java.lang.String, com.ail.financial.CurrencyAmount)
public void addFixedSum(java.lang.String reason,
Reference relatesTo,
java.lang.String contributesTo,
CurrencyAmount amount,
int priority)
reason - 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.amount - The amount to be contributed.priority - The priority of this line wrt other lines in this sheet (low value=low priority)addFixedSum(java.lang.String, java.lang.String, com.ail.insurance.policy.Reference, java.lang.String, com.ail.financial.CurrencyAmount)
public void addAssessmentNote(java.lang.String reason,
Reference relatesTo)
AssessmentNote
to the sheet using the reason and releatesTo values passed in. The line's ID is automatically generated.
reason - Free text of note.relatesTo - Optional reference to the part of the policy that the note related to (may be null).addAssessmentNote(java.lang.String, com.ail.insurance.policy.Reference)
public void addAssessmentNote(java.lang.String id,
java.lang.String reason,
Reference relatesTo)
AssessmentNote
to the sheet using the reason and releatesTo values passed in. The line's ID is automatically generated.
id - The Id to use for this linereason - Free text of note.relatesTo - Optional reference to the part of the policy that the note related to (may be null).addAssessmentNote(java.lang.String, com.ail.insurance.policy.Reference)public java.lang.String getLockingActor()
public void setLockingActor(java.lang.String lockingActor)
lockingActor - New value for the lockingActor property
java.lang.IllegalStateException - If the sheet is already locked by another actorpublic void clearLockingActor()
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
Type
clone in class Typejava.lang.CloneNotSupportedException - If the type cannot be deep cloned.public int getAutoPriority()
autoPriority
is used for the added line. The autoPriority property is incremented each time it
is used, thus meaning that lines have a priority defined by the order in which
they are added to the sheet.
public void setAutoPriority(int autoPriority)
autoPriority - the autoPriority to setgetAutoPriority()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||