package gw.lob.bop.rating uses java.util.Date uses gw.api.effdate.EffDatedUtil uses entity.windowed.BOPBuildingCovVersionList uses gw.financials.PolicyPeriodFXRateCache uses java.util.List uses gw.pl.persistence.core.Key @Export class BOPBuildingCovCostData extends BOPCostData { protected var _covID : Key construct(effDate : Date, expDate : Date, stateArg : Jurisdiction, covID : Key) { super(effDate, expDate, stateArg) assertKeyType(covID, entity.BOPBuildingCov) init(covID) } construct(effDate : Date, expDate : Date, c : Currency, rateCache : PolicyPeriodFXRateCache, stateArg : Jurisdiction, covID : Key) { super(effDate, expDate, c, rateCache, stateArg) assertKeyType(covID, entity.BOPBuildingCov) init(covID) } construct(cost : BOPBuildingCovCost) { super(cost) init(cost.BOPBuildingCov.FixedId) } construct(cost : BOPBuildingCovCost, rateCache : PolicyPeriodFXRateCache) { super(cost, rateCache) init(cost.BOPBuildingCov.FixedId) } private function init(covID : Key) { _covID = covID } override function setSpecificFieldsOnCost(line : BOPLine, cost : BOPBuildingCovCost) : void { super.setSpecificFieldsOnCost( line, cost ) cost.setFieldValue("BOPBuildingCov", _covID) } override function getVersionedCosts(line : BOPLine) : List { var covVL = EffDatedUtil.createVersionList( line.Branch, _covID ) as BOPBuildingCovVersionList var costs = covVL.Costs.allVersions(true) // warm up the bundle and global cache return costs.Keys.toList() } protected override property get KeyValues() : List { return {_covID} } }