Handling premium overrides

A line of business can optionally support premium overrides. Of the built-in lines, only the worker’s compensation line supports premium overrides.

If a policy type supports premium overrides, then while calculating the premium for a particular cost data object, your rating calculation logic must determine the following situations.

  • Is there is an existing cost entity instance in the database?

    To find any previous cost entity instance, call the AbstractRatingEngine object’s method getExistingCost. Each line-specific rating engine must implement their own version of the getExistingCost method.

  • If there is an existing cost entity instance, does it contain overrides?
    • If there are no overrides for the properties that support overrides, use the standard properties. Standard properties are the pre-override values in properties with names that start with Standard. For example, StandardAmount. Because there are no overrides, your rating engine must copy the standard properties (the value before any overrides) to the actual properties. To accomplish this, the rating code for workers’ compensation uses the cost data object method copyStandardColumnsToActualColumns.

      Only use copyStandardColumnsToActualColumns for costs without overrides. Never call the method if the cost has overrides, because the method deletes any existing override data.

    • If there are overrides, use the override properties. Override properties are properties with names that start with Override. For example, OverrideAmount. The rating engine needs to copy override properties to the actual properties.

Be aware that there is a cost data object method called copyOverridesFromCost. However, this is not intended for use during the actual rating calculation. The built-in code calls that method to save override values into a cost data object. This ensures that any old override values are not lost when converting to a cost data object and back to a cost entity at a later time. Some people call this process round-tripping those properties between the costs entity and cost data forms.

The built-in workers’ compensation rating line shows how different override properties to adjust from using standard values to using overridden values.