Inland marine rating
The built-in rating engine for the inland marine line of business is the Gosu class gw.lob.im.IMRatingEngine.
The inland marine line of business is unusual because each line consists of multiple coverage parts (CoveragePart objects). The industry uses many varied coverage parts, but the supported coverage parts for the default rating engine are listed below.
- Sign part
- Contractor equipment part
- Accounts receivable part
Each of these parts typically rate in very different ways.
The IMRatingEngine class overrides the logic of the base class for rating engines and calls out to other classes to do the actual rating for each coverage part. In other words, each coverage part has as its own separate class that acts like a rating engine just for that part.
Look in the IMRatingEngine class for the private
method rateByPart. For
each slice date, the code first gets the relevant InlandMarlineLine entity. Next,
it iterates across each part and calls a private method called ratePart for each CoveragePart object. The private
method ratePart checks
the CoveragePart subtype
and gets the appropriate rating subclass for each type to rate that information.
These part-specific rating engine subclasses extend a base class unique
for inland marine: IMAbstractPartRatingEngine.
Although the name for this class contains
the words “rating engine,” IMAbstractPartRatingEngine
does not extend the rating engine root class AbstractRatingEngine. The IMAbstractPartRatingEngine is
just a special utility class for use only with inland marine rating.
This class allows the default rating engine to separate the shared rating
behavior from part-specific rating calculations (such as rating the contractor
equipment part).
Each of these classes have a rate method that does the actual
work of rating for inline marine. The IMRatingEngine
class calls the rate method
on each part-specific class. The rate method returns a list of cost data
objects (List<CostData>).
