com.ail.insurance.policy
Class Reference

java.lang.Object
  extended by com.ail.core.Type
      extended by com.ail.insurance.policy.Reference
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class Reference
extends Type

Points to another part/element of a policy.

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

Field Summary
 
Fields inherited from class com.ail.core.Type
jXPathContext, NOT_PERSISTED
 
Constructor Summary
Reference()
          Default constructor
Reference(ReferenceType type, java.lang.String id)
          Constructor
 
Method Summary
 java.lang.String getId()
           
 ReferenceType getType()
          Get the value of the type property.
 java.lang.String getTypeAsString()
          Get the current value of the type property as a String.
 void setId(java.lang.String id)
           
 void setType(ReferenceType type)
          Set the type property.
 void setTypeAsString(java.lang.String type)
          Set the type property from a String.
 
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

Reference

public Reference()
Default constructor


Reference

public Reference(ReferenceType type,
                 java.lang.String id)
Constructor

Parameters:
type - The type of the object being referenced
id - The Id of the object being referenced
Method Detail

setType

public void setType(ReferenceType type)
Set the type property. This indicates the type of the object being referenced (e.g. asset, section, excess, ...).

Parameters:
type - New value for type property.

setTypeAsString

public void setTypeAsString(java.lang.String type)
Set the type property from a String. This indicates the type of the object being referenced (e.g. asset, section, excess, ...). The argument passed must represent a valid value for calling ReferenceType.forName(arg).

Parameters:
type - New value for type property.
Throws:
java.lang.IndexOutOfBoundsException - If type is not a valid string representation of ReferenceType.
See Also:
ReferenceType.forName(java.lang.String), setType(com.ail.insurance.policy.ReferenceType)

getType

public ReferenceType getType()
Get the value of the type property. This indicates the type of the object being referenced (e.g. asset, section, excess, ...).

Returns:
Value of type

getTypeAsString

public java.lang.String getTypeAsString()
Get the current value of the type property as a String.

Returns:
Value of type property as a String, or null if type is null.
See Also:
getType()

getId

public java.lang.String getId()

setId

public void setId(java.lang.String id)