Map the new entity and array extensions in ClaimCenter
After creating new Contact entities and array extensions, you need to map them from ClaimCenter to ContactManager.
Before you begin
About this task
In this step, you add the new array reference and the entity it references to the ContactMapper class in ClaimCenter.
For more information on this class, see ContactMapper class. Additionally, for more information on the last step in this topic, see ContactManager link IDs and comparison to other IDs.
Procedure
-
In Guidewire Studio™ for ClaimCenter, press Ctrl+N and search for the
class ContactMapper, and then double-click the
ab1000version of this class in the search results to open it in the editor. -
Find the Mappings method, which has the following declaration:
override property get Mappings() : Set<CCPropertyMapping>In this method, you will add a method for Contact array reference ContactServiceArea and methods that map the elements of the array, ContactServiceState. -
At the end of the method, add a comma to the last line of code so you can add more code. For example:
.withEntityBeanBlock( \ lm, bp -> populateBeanFromXml(bp)), -
After this last line of code, add an arrayMapping method for
Contact#ContactServiceArea, preceded with a comment for this part of the Mappings method://ContactServiceState mapping arrayMapping(Contact#ContactServiceArea), -
Add fieldMapping methods for the elements of the ContactServiceState entity, which the
ABContactarray reference refers to:fieldMapping(ContactServiceState#AddressBookUID) .withABName(MappingConstants.LINK_ID), fieldMapping(ContactServiceState#PublicID) .withMappingDirection(TO_XML) .withABName(MappingConstants.EXTERNAL_PUBLIC_ID), fieldMapping(ContactServiceState#ServiceState)This code maps between the following ContactServiceState fields in ClaimCenter and ContactManager.
ClaimCenter ContactManager Direction AddressBookUIDLINK_IDBoth ways PublicIDEXTERNAL_PUBLIC_IDFrom ClaimCenter to ContactManager only ServiceStateServiceStateBoth ways
