@Override public void writeDestValue(Object destObj, Object destFieldValue) { DozerPropertyDescriptor propDescriptor; Object targetObject = destObj; if (getDestFieldName().equals(DozerConstants.SELF_KEYWORD) || (destFieldValue != null && MappingUtils.isSupportedMap(destFieldValue.getClass()))) { // Destination value is already a Map, so just use normal propDescriptor = super.getDestPropertyDescriptor(destObj.getClass()); } else { if (getDestFieldMapGetMethod() != null || MappingUtils.isSupportedMap(determineActualPropertyType(getDestFieldName(), isDestFieldIndexed(), getDestFieldIndex(), destObj, true))) { // Need to dig out actual destination Map object and use map property descriptor to set the value on that target object.... PrepareTargetObjectResult result = prepareTargetObject(destObj); targetObject = result.targetObject; propDescriptor = result.propDescriptor; } else { propDescriptor = super.getDestPropertyDescriptor(destObj.getClass()); } } propDescriptor.setPropertyValue(targetObject, destFieldValue, this); }
@Override public void writeDestValue(Object destObj, Object destFieldValue) { DozerPropertyDescriptor propDescriptor; Object targetObject = destObj; if (getDestFieldName().equals(DozerConstants.SELF_KEYWORD) || (destFieldValue != null && MappingUtils .isSupportedMap(destFieldValue.getClass()))) { // Destination value is already a Map, so just use normal propDescriptor = super.getDestPropertyDescriptor(destObj.getClass()); } else { if (getDestFieldMapGetMethod() != null || MappingUtils.isSupportedMap(determineActualPropertyType( getDestFieldName(), isDestFieldIndexed(), getDestFieldIndex(), destObj, true))) { // Need to dig out actual destination Map object and use map // property descriptor to set the value on that target // object.... PrepareTargetObjectResult result = prepareTargetObject(destObj); targetObject = result.targetObject; propDescriptor = result.propDescriptor; } else { propDescriptor = super.getDestPropertyDescriptor(destObj.getClass()); } } propDescriptor.setPropertyValue(targetObject, destFieldValue, this); }
@Override public void writeDestValue(Object destObj, Object destFieldValue) { DozerPropertyDescriptor propDescriptor; Object targetObject = destObj; if (getDestFieldName().equals(DozerConstants.SELF_KEYWORD) || (destFieldValue != null && MappingUtils .isSupportedMap(destFieldValue.getClass()))) { // Destination value is already a Map, so just use normal propDescriptor = super.getDestPropertyDescriptor(destObj.getClass()); } else { if (getDestFieldMapGetMethod() != null || MappingUtils.isSupportedMap(determineActualPropertyType( getDestFieldName(), isDestFieldIndexed(), getDestFieldIndex(), destObj, true))) { // Need to dig out actual destination Map object and use map // property descriptor to set the value on that target // object.... PrepareTargetObjectResult result = prepareTargetObject(destObj); targetObject = result.targetObject; propDescriptor = result.propDescriptor; } else { propDescriptor = super.getDestPropertyDescriptor(destObj.getClass()); } } propDescriptor.setPropertyValue(targetObject, destFieldValue, this); }