Create copier for a policy line
Procedure
-
Create a line-specific copier that
extends the gw.api.copy.CompositeCopier
class. In Studio, create a gw.lob.cp.CPPolicyLineCopier
class.
The signature for
CompositeCopieris:CompositeCopier<T extends KeyableBean, S extends KeyableBean>Tis the target andSis the source. -
In your class, define the signature where the target is
PolicyPeriod, and the source is the policy line.uses gw.api.copy.CompositeCopier class CPPolicyLineCopier extends CompositeCopier<PolicyPeriod, CommercialPropertyLine> { construct() { } } -
In
gw.lob.cp.CPPolicyLineMethods, override theget Copierproperty to return your new line copier class.override property get Copier() : CompositeCopier<PolicyPeriod, CommercialPropertyLine> { return new CPPolicyLineCopier(_line) } -
In , create a
CopyPolicyDV.CPLinePCF file. UsingCopyPolicyDV.PersonalAutoLineas an example, design the user interface for copying data. -
Create copiers and composite copiers for the entities and other data that you want to copy.
Decide which coverables to copy, such as locations and buildings for commercial property. Create copiers for these coverables.
For example, the personal auto line has the following copiers in the
gw.lob.papackage:AddlInterestDetailsCopier extends CopierAllAddlInterestDetailsCopier extends GroupingCompositeCopierModifierCopier extends CopierPAPolicyLineCopier extends CompositeCopierPersonalVehicleCopier extends CompositeCopierPolicyDriverCopier extends Copier
-
Optional – In the line Copier class, add methods to retrieve the child copiers of the line. In
gw.lob.pa.PAPolicyLineCopier, personal auto has an example that gets the personal vehicle copier:property get PersonalVehicleCopiers() {...}
