Define coverage entity for coverable
About this task
The coverable objects need coverage entities. The Golf Cart line has two coverable objects, GolfCartLine and GOCart. The following steps explain how to define the GolfCartLineCov entity that provides coverage for the GolfCartLine.
Procedure
-
In Studio, create the new coverage entity for the coverable object. In the
entityelement:- Set the
tableattribute to the name of the coverage in lower case letters. - Set the
typeattribute toeffdated. - Set the
effDatedBranchTypeattribute toPolicyPeriod.
For Golf Cart, create the GolfCartLineCov entity. In the Entity editor window, with the entity element selected, set the following properties:Property
Value
tablegolfcartlinecovtypeeffdatedeffDatedBranchTypePolicyPeriodexportabletrue - Set the
-
Add a foreign key to the coverable.
For Golf Cart, add a
foreignkeyelement toGolfCartLine.Property
Value
nameGOLinefkentityGolfCartLinenullokfalse -
Add coverage terms as columns in the coverage entity. (The previous topic explained how to specify the number and types of coverage terms required.) Add a coverage term for each type that can be used in this coverage. Add the maximum number coverage terms for each coverage term type. The
namefor each coverage term must be unique among coverage terms. For example, you can set thenameof the first direct coverage term to DirectTerm1, and thenameof the second to DirectTerm2.For the Golf Cart line, you can add the following to the coverage term table:- Two direct coverage terms
- One choice coverage term
- One Boolean coverage term
Example
The following XML code represents a typical, complete coverage entity definition for GolfCartLineCov:
<?xml version="1.0"?>
<!--Golf Cart Line Coverage-->
<entity
xmlns="http://guidewire.com/datamodel"
desc="A line-level coverage for Golf Cart Line"
effDatedBranchType="PolicyPeriod"
entity="GolfCartLineCov"
exportable="true"
final="false"
platform="false"
table="golfcartlinecov"
type="effdated">
<foreignkey fkentity="GolfCartLine" name="GOLine" nullok="false"/>
<column name="DirectTerm1"
nullok="true"
type="decimal" desc="direct covterm field"
getterScriptability="doesNotExist" setterScriptability="doesNotExist">
<columnParam name="scale" value="4"/>
<columnParam name="precision" value="20"/>
</column>
<column name="DirectTerm1Avl"
nullok="true"
type="bit" getterScriptability="doesNotExist"
setterScriptability="doesNotExist"
desc="whether or not the DirectTerm1 field was available the last time
availability was checked"/>
<column name="DirectTerm2"
nullok="true"
type="decimal" desc="direct covterm field"
getterScriptability="doesNotExist" setterScriptability="doesNotExist">
<columnParam name="scale" value="4"/>
<columnParam name="precision" value="20"/>
</column>
<column name="DirectTerm2Avl"
nullok="true"
type="bit" getterScriptability="doesNotExist"
setterScriptability="doesNotExist"
desc="whether or not the DirectTerm2 field was available the last time
availability was checked"/>
<column name="ChoiceTerm1"
nullok="true"
type="patterncode" desc="choice covterm field"
getterScriptability="doesNotExist"
setterScriptability="doesNotExist"/>
<column name="ChoiceTerm1Avl"
nullok="true"
type="bit"
desc="whether or not the ChoiceTerm1 field was available the last time
availability was checked"
getterScriptability="doesNotExist" setterScriptability="doesNotExist"/>
<column name="BooleanTerm1"
nullok="true"
type="bit" desc="boolean covterm field"
getterScriptability="doesNotExist" setterScriptability="doesNotExist" />
<column name="BooleanTerm1Avl"
nullok="true"
type="bit" getterScriptability="doesNotExist"
setterScriptability="doesNotExist"
desc="whether or not the BooleanTerm1 field was available the last time
availability was checked"/>
</entity>