Mapping fields of a ContactManager contact
The method fieldMapping(Entity#Field) by default maps ABContact entity and subentity fields in both directions, both to and from a Guidewire core application.
Note: Parameters to methods in
ContactMapper use Gosu feature literals syntax to statically
refer to an entity’s fields. See Using feature literals.The mapping directions are:
- To a Guidewire core application
- From a ContactManager entity to an XML object to be sent to a Guidewire core application
- From a Guidewire core application
- From an XML object sent by a core application to a ContactManager entity
You also use this method to map fields of an entity that the contact references with either an array reference or a foreign key. To map a foreign key or array reference itself, you use different methods.
Each complete method call must be followed by a comma unless it is the last method call in the block.
Specifying a Single Direction
You specify a single direction by using
.withMappingDirection,
as follows:
.withMappingDirection(TO_XML)- Maps the field from ContactManager to the core application.
For example, use this method call to map a
LinkIDfield to a core application:fieldMapping(ABContact#LinkID) .withMappingDirection(TO_XML), .withMappingDirection(TO_BEAN)- Maps the field from the core application to ContactManager.
