Using Customized Encoding/Decoding Classes

By default the encoding method used for each field in a struct used or returned by connector operations is based on the type of the field. For example, the mapper class for curam.util.type.DateTime is curam.util.connectors.mqseries.MQFieldMapper.DateTimeMapper; for boolean fields it is curam.util.connectors.mqseries.MQFieldMapper.BooleanMapper.

For any individual field in any operation it is possible to override this default and specify the name of the class which should be used to map the data. Names of the custom mapper classes are specified in the properties file QueueConnectorFieldMappers.properties which must be included in the application classpath.

Entries in the properties file take the following format:

[class].[operation].[param].[field]=[mapper]

where

Figure 1. Sample QueueConnectorFieldMappers.properties
MyBPO.connectorOp1.dtls.phoneNumber=com.acme.util.PNMapper
MyBPO.connectorOp1.return.phoneNumber=com.acme.util.PNMapper