gov.nih.nci.caarray.services.util.dataconverter.mapper.fieldmappers
Class Id2ObjectFieldMapper

java.lang.Object
  extended by gov.nih.nci.caarray.services.util.dataconverter.mapper.FieldMapper
      extended by gov.nih.nci.caarray.services.util.dataconverter.mapper.fieldmappers.Id2ObjectFieldMapper

public class Id2ObjectFieldMapper
extends FieldMapper

This custom field mapper allows setting NULL to the target field when the source field that is a long attribute and represents the target field value's identifying information is a zero.

Author:
TranP

Constructor Summary
Id2ObjectFieldMapper(ClassMapper classMapper, SimpleField sourceField, SimpleField targetField)
           
 
Method Summary
 void map(java.lang.Object sourceObject, java.lang.Object targetObject, boolean overwrite)
          Converts the value contained in the source field of the source object specified by this converter to be the value for the target field of the target object specified by this converter.
 
Methods inherited from class gov.nih.nci.caarray.services.util.dataconverter.mapper.FieldMapper
createFieldMapper, getClassMapper, getFieldMapperInfo, getIndexOfIndexedProperty, getNestedProperty, getNestedPropertyParentType, getParameterTypeOfPropertySetter, getProperty, getSourceField, getTargetField, reverse, setNestedProperty, setProperty, setSourceField, setTargetField, toAccessibleFieldName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Id2ObjectFieldMapper

public Id2ObjectFieldMapper(ClassMapper classMapper,
                            SimpleField sourceField,
                            SimpleField targetField)
Parameters:
classMapper -
sourceField -
targetField -
Method Detail

map

public void map(java.lang.Object sourceObject,
                java.lang.Object targetObject,
                boolean overwrite)
Description copied from class: FieldMapper
Converts the value contained in the source field of the source object specified by this converter to be the value for the target field of the target object specified by this converter.

Overrides:
map in class FieldMapper