Mapper.getFieldValue Interface

/** 
 * If a specialized field value can't be covered by the 
 * <code>SearchServiceMapper.getValue()
 * <code> functionality this method 
 * should be overridden in the mapper for the specific search 
 *   service. 
 * @param objList list of entity objects for this specific 
 *   mappers service id.  
 * @param field the field whose value is required. 
 */ 
Object getFieldValue(final SearchServiceKey serviceId, 
   final List objList, final SearchServiceFieldDtls fieldDtls);

The Generic Search Server infrastructure will try to retrieve an entity attribute value from an object list by using Field metadata retrieved from the Search Service Field table. Typically, objectLists will contain entity dtls structs, and in such cases it is trivial for the Generic Search Server to use reflection to identify the correct attribute and get its value - this is exactly what is done behind the scenes.

However, if the objectList contains something other than an entity dtls struct (as in the case of Person Search, where an AddressElementDtlsList is present, itself containing a single AddressElement struct) then the Mapper.getFieldValue interface method should be implemented by search developers.

The Mapper.getFieldValue interface method should be implemented if a Mapper cannot automatically map a specific attribute value. The relevant entity and field name is passed in via the fieldDtls struct parameter, and the attribute value can be retrieved from the objList using reflection. It is up to the search developer to implement this method interface for the type or types to be catered for.

Empty strings should not be returned from this method - null should always be returned.