com.ail.insurance.policy
Class AssessmentLine

java.lang.Object
  extended by com.ail.core.Type
      extended by com.ail.insurance.policy.AssessmentLine
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<AssessmentLine>
Direct Known Subclasses:
AssessmentNote, CalculationLine, Marker, MarkerResolution

public class AssessmentLine
extends Type
implements java.lang.Comparable<AssessmentLine>

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

Field Summary
 
Fields inherited from class com.ail.core.Type
jXPathContext, NOT_PERSISTED
 
Constructor Summary
AssessmentLine()
          Default constructor
AssessmentLine(java.lang.String id, java.lang.String reason, Reference relatesTo)
          Construnctor.
AssessmentLine(java.lang.String id, java.lang.String reason, Reference relatesTo, int priority)
          Construnctor
 
Method Summary
 int compareTo(AssessmentLine that)
           
 int getCalculatedOrder()
           
 java.lang.String getId()
           
 java.lang.String getOrigin()
          Getter returning the value of the origin property.
 int getPriority()
          The priority of a line affects the order in which it is processed (with respect to other lines) by services.
 java.lang.String getReason()
           
 Reference getRelatesTo()
           
 boolean isDisabled()
          Determine if this line is disabled.
 void setCalculatedOrder(int calculatedOrder)
           
 void setDisabled(boolean disabled)
           
 void setId(java.lang.String id)
           
 void setOrigin(java.lang.String origin)
          Setter to update the value of the origin property.
 void setPriority(int priority)
           
 void setReason(java.lang.String reason)
           
 void setRelatesTo(Reference relatesTo)
           
 
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

AssessmentLine

public AssessmentLine()
Default constructor


AssessmentLine

public AssessmentLine(java.lang.String id,
                      java.lang.String reason,
                      Reference relatesTo)
Construnctor. A default priority of 0 is assumed.

Parameters:
id - Value for Id property.
reason -
relatesTo -

AssessmentLine

public AssessmentLine(java.lang.String id,
                      java.lang.String reason,
                      Reference relatesTo,
                      int priority)
Construnctor

Parameters:
id - Value for Id property.
reason - The reason for creating this line.
relatesTo - The id of another line that this one relates to.
priority - The priority of this line wrt other lines in the same assessment sheet.
Method Detail

getId

public java.lang.String getId()

setId

public void setId(java.lang.String id)

getRelatesTo

public Reference getRelatesTo()

setRelatesTo

public void setRelatesTo(Reference relatesTo)

getReason

public java.lang.String getReason()

setReason

public void setReason(java.lang.String reason)

getOrigin

public java.lang.String getOrigin()
Getter returning the value of the origin property. Origin describes the actor (system or user) who created this AssessmenLine.

Returns:
Value of the origin property

setOrigin

public void setOrigin(java.lang.String origin)
Setter to update the value of the origin property. Origin describes the actor (system or user) who created this AssessmenLine.

Parameters:
origin - New value for the origin property

isDisabled

public boolean isDisabled()
Determine if this line is disabled. By default all lines are enabled when created, and as such are included in the calculations and assessments carried out by services, but individual lines may be disabled. When a line is disabled it is simple ignored by all services that operate on assessment sheets.

Returns:
Returns the disabled.

setDisabled

public void setDisabled(boolean disabled)
Parameters:
disabled - The disabled to set.
See Also:
isDisabled()

getPriority

public int getPriority()
The priority of a line affects the order in which it is processed (with respect to other lines) by services. Some services (for example RefreshAssessmentSheetService) process all the lines in an assessment sheet. Such services use the priority of the lines to determine the order in which the lines should be processed.

The priority may be any integer value, higher values are processed before lower.

Returns:
Returns the priority.

setPriority

public void setPriority(int priority)
Parameters:
priority - The priority to set.
See Also:
getPriority()

compareTo

public int compareTo(AssessmentLine that)
Specified by:
compareTo in interface java.lang.Comparable<AssessmentLine>

getCalculatedOrder

public int getCalculatedOrder()

setCalculatedOrder

public void setCalculatedOrder(int calculatedOrder)