Methods and properties of the abstract rating engine class
The following tables summarize the methods in the abstract rating engine class to override or use. The rightmost column indicates whether a new rating engine typically overrides this method.
The methods in this table are methods that a new rating engine would typically override.
|
AbstractRatingEngine method (or property as noted) |
Description |
Override it? |
|---|---|---|
|
|
Given the specified Cost entity instance, creates the appropriate
|
Yes, for typical rating lines. If you completely override the rateOnly method or
you override |
|
|
When rating only from the change date forward, this method finds any existing slice-mode costs and returns cost data objects to represent them. Typically, you would omit some costs such as taxes, which PolicyCenter treats as costs that the rating creates in window mode not on a per-slice basis. This method must return costs currently on the period that correspond to costs that are generated during the rateSlice method. |
Yes, for typical rating lines. If you completely override the rateOnly method or
you override |
|
|
Returns the tax rate for the given state. The postal code can affect local sales taxes, but the built-in logic does not use it. The default rating engine returns varying numbers based on the state, but it is only a default implementation. Override this method to encode your own rates. |
Yes |
|
|
This |
Required |
|
|
The core rating loop, with the following actions.
|
Only if you want to bypass the general logic of the rating engine |
|
|
Rates a given slice of the policy for this rating line. The method has a policy line
( |
Yes, for typical rating lines. If you completely override the rateOnly method, this method is unused. |
|
|
Rates the policy in window mode. This is where you would create costs that meet either of the following conditions.
The argument is the version of the policy line that is earliest in effective time. |
Yes, for typical rating lines. If you completely override the rateOnly method, this method is unused. |
|
|
This |
Yes |
|
|
Determines whether to rate only from the effective date of the job forward. If this returns
Choosing to rate from the change date forward is a performance optimization compared to rating the whole policy from the period start date. Even if you choose to use this optimization, PolicyCenter in some cases still rates the whole policy from the period start date, for example for a cancellation. Design your code to ensure that if PolicyCenter rates the entire period or from the change date, the rating engine always returns the same consistent cost values. |
Only if you want to change the default logic. See the topics mentioned earlier in this table row. |
The methods in the following table are utility methods, helper methods for the default rating engine, or internal methods that you override only if you significantly change the logic.
Utility methods perform the following types of functions.
- Merge and prorate CostData objects
- Calculate the number of days in the rated term based on the default policy term for the product
- Calculate a demo tax rate
- Calculate a short rate penalty rate
|
AbstractRatingEngine method |
Description |
Override it? |
|---|---|---|
|
|
Adds a cost data object to the internal list of cost data objects for this rating line. You probably do not need to use this API unless you greatly change the logic of the class. |
No |
|
|
Asserts that the specified revisioned entity instance is in slice mode. This is a general utility function you can use. |
No. It is a general utility function you can use. |
|
|
Asserts that the specified revisioned entity instance is in window mode. |
No. It is a general utility function you can use. |
|
|
Performs the following operations.
|
No |
|
|
If possible, merges two costs. It returns |
No |
|
|
This method take a list of costs and a cut-off date and performs the following actions.
The built-in rating engine only calls this if the method
shouldRateThisSliceForward returns You probably do not need to use this API unless you greatly change the logic of the class. |
No |
|
|
Given a particular date, finds the next effective date following this date. The built-in rating logic uses this method when rating in slice mode to determine the next change date. This allows the rating logic to determine how many days long the current slice is. Use this method to set the effective and expiration dates of the cost. |
No |
|
|
Merge any equal costs that are attributed to the same elements (they have matching cost keys) and adjacent in effective time. This method returns a new list of costs rather than modifying the existing list of costs in place. |
No |
|
|
Takes a cost, a cut-off date, an amount, and a rounding level. This method prorates the specified
amount from the effective date of the cost to the given cut-off date. If the amount is
|
No |
|
|
This is the entry point for the rating request. The rating plugin calls this method for each rating line. It performs the following operations.
|
No. Typically do not override this. For typical rating lines, just override
|
|
|
Prorates any costs that do not yet have an |
No |
|
|
Ensures that for any given period of time, there is only one Cost entity instance
with a given cost key ( |
No |
