What do cost data objects contain?

A cost data object (the CostData class) mimics a Cost entity, including its properties. A cost data object also includes the properties for prorating the amount and rate values. Just like for a regular Cost entity, properties for amount and rate values prorate according to the percentage of the term that the cost is effective.

For every line-specific Cost entity, each line of business must subclass CostData to create an equivalent cost data object for each Cost entity. The cost data entity has the same name as the entity followed by the suffix Data. For example, the personal auto line of business includes a cost entity called PersonalAutoTaxCost. This entity’s corresponding cost data object class has the name PersonalAutoTaxCostData.

Each cost data class defines methods that tell PolicyCenter how to persist a CostData object persists to a Cost entity. As part of this, PolicyCenter needs to know how to combine similar cost data objects.

A cost data class includes the following important properties and methods.

  • Cost-related properties – Cost-related properties defined by the corresponding cost entity. For example, the PersonalAutoTaxCostData class has equivalent properties for each cost-related property of the PersonalAutoTaxCost entity. It is important to note that any properties that represent links to other entity instances work differently in cost data objects compared to normal cost entity instances. Cost data objects use fixed ID Key objects to represent these links.
  • Methods that you override – Each cost data object class must help the rating engine with tasks such as finding the related cost entity instance for this cost data object.
  • API methods that you can call – Every cost data class inherits some built-in APIs from the CostData class. If you use the built-in default rating architecture (the Guidewire recommendation), the AbstractRatingEngine that calls these. In that case, you do not typically need to call these APIs. If you do not use the built-in abstract rating engine or if you heavily modify it, you may need to use these APIs to implement rating.

See also