Composite copier API
The CompositeCopier is an abstract class that copies an entity together with its child entities. The CompositeCopier class extends Copier. For example, the PersonalVehicle composite copier copies the properties directly associated with the PersonalVehicle entity and also copies coverages and additional interests on the vehicle. The PersonalVehicleCopier delegates the work of copying child entities to other copiers.
The abstract CompositeCopier class provides the following methods for constructing the copier tree:
addCopier– Adds a specific copier to the composite tree of copiers.addAllCopiers– Adds multiple copiers to the tree of copiers.
Personal vehicle copier: a composite copier
The PersonalVehicleCopier is a subclass of CompositeCopier. This class delegates the copying of coverages, additional interests, and modifiers to copiers for those entities. The PersonalVehicleCopier constructor initializes the other copiers. The CompositeCopier abstract class automatically calls each of the other copiers, which some or all of which can be marked as ShouldCopy.
The personal vehicle copier copies the following:
- Modifiers –
ModifierCopieris always included. Therefore, modifiers do not appear as a selection on the Select data to copy from Policy screen. - All coverages – If you select Include All Coverages,
vehicleCopier.AllCoverageCopier.ShouldCopyAllis set totruein the PCF file, and all coverages are copied. - Individual coverages – If you select coverages under Individual Coverages, each selected coverage has
ShouldCopyset totruein the PCF file. PolicyCenter iterates through the individual copiers in theAllCoveragesCopierby executing the following code:SelectIndividualCoveragesLV(vehicleCopier.AllCoverageCopier.AllExistingCoverageCopier.Copiers) - Additional
interests – If you select Include
Additional Interests,
vehicleCopier.AllAddlInterestDetailsCopier.ShouldCopyAllis set totruein the PCF file. All additional interests are copied.
