package gw.beantransfer.impl uses com.guidewire.pl.system.internal.InternalMethods uses gw.beantransfer.BeanImportHandler /** * Bean Transfer handler for hooking up the Policy with the PolicyPeriod. */ class EffDatedContainerPropertyHandler implements BeanImportHandler { var _graph : BeanImportGraph var _effDatedContainerByID : Map = {} construct(graph : BeanImportGraph) { _graph = graph } override function setIdOnBean(bean : KeyableBean, dbId : String) { if (bean typeis EffDatedContainer) { var entityType = bean.IntrinsicType var effDatedContainerElement = _graph.getElementByDatabaseId(entityType, dbId) var effDatedContainerID = effDatedContainerElement.DocID _effDatedContainerByID[effDatedContainerID] = bean } else if (bean typeis EffDatedBranch) { var entityType = bean.IntrinsicType var effDatedContainerProperty = InternalMethods.asIEntityTypeInternal(entityType).EffDatedContainerProperty var effDatedBranchElement = _graph.getElementByDatabaseId(entityType, dbId) var effDatedContainerID = effDatedBranchElement.getAttribute(effDatedContainerProperty.Name) var effDatedContainer = _effDatedContainerByID[effDatedContainerID] bean.setFieldValue(effDatedContainerProperty, effDatedContainer) } } }