public Class<?> getGenericType(Class<?> runtimeDestClass) { DozerPropertyDescriptor propertyDescriptor = getDestPropertyDescriptor(runtimeDestClass); return propertyDescriptor.genericType(); }
/** * @deprecated As of 3.2 release */ @Deprecated public Class<?> getDestFieldWriteMethodParameter(Class<?> runtimeDestClass) { // 4-07 mht: The getWriteMethod was removed from the prop descriptor interface. This was done as part of // refactoring effort to clean up the prop descriptor stuff. The underlying write method should not be exposed. // For now, just explicitly cast to the only prop descriptor(getter/setter) that could have been used in this // context. The other types of prop descriptors would have failed. DozerPropertyDescriptor dpd = getDestPropertyDescriptor(runtimeDestClass); return ((GetterSetterPropertyDescriptor) dpd).getWriteMethodPropertyType(); }
public Class<?> getGenericType(Class<?> runtimeDestClass) { DozerPropertyDescriptor propertyDescriptor = getDestPropertyDescriptor(runtimeDestClass); return propertyDescriptor.genericType(); }
public Class<?> getGenericType(Class<?> runtimeDestClass) { DozerPropertyDescriptor propertyDescriptor = getDestPropertyDescriptor(runtimeDestClass); return propertyDescriptor.genericType(); }
public Object getDestValue(Object runtimeDestObj) { return getDestPropertyDescriptor(runtimeDestObj.getClass()).getPropertyValue(runtimeDestObj); }
public Object getDestValue(Object runtimeDestObj) { return getDestPropertyDescriptor(runtimeDestObj.getClass()).getPropertyValue(runtimeDestObj); }
public void writeDestValue(Object runtimeDestObj, Object destFieldValue) { if (log.isDebugEnabled()) { String className = MappingUtils.getClassNameWithoutPackage(runtimeDestObj.getClass()); log.debug("Getting ready to invoke write method on the destination object. Dest Obj: {}, Dest value: {}", className, destFieldValue); } DozerPropertyDescriptor propDescriptor = getDestPropertyDescriptor(runtimeDestObj.getClass()); propDescriptor.setPropertyValue(runtimeDestObj, destFieldValue, this); }
public void writeDestValue(Object runtimeDestObj, Object destFieldValue) { if (log.isDebugEnabled()) { String className = MappingUtils.getClassNameWithoutPackage(runtimeDestObj.getClass()); log.debug("Getting ready to invoke write method on the destination object. Dest Obj: {}, Dest value: {}", className, destFieldValue); } DozerPropertyDescriptor propDescriptor = getDestPropertyDescriptor(runtimeDestObj.getClass()); propDescriptor.setPropertyValue(runtimeDestObj, destFieldValue, this); }
public void writeDestValue(Object runtimeDestObj, Object destFieldValue) { if (log.isDebugEnabled()) { String className = MappingUtils.getClassNameWithoutPackage(runtimeDestObj.getClass()); log.debug("Getting ready to invoke write method on the destination object. Dest Obj: {}, Dest value: {}", className, destFieldValue); } DozerPropertyDescriptor propDescriptor = getDestPropertyDescriptor(BuilderUtil.unwrapDestClassFromBuilder(runtimeDestObj)); propDescriptor.setPropertyValue(runtimeDestObj, destFieldValue, this); }
public Class<?> getDestFieldType(Class<?> runtimeDestClass) { Class<?> result = getDestPropertyDescriptor(runtimeDestClass).getPropertyType(); if (isDestFieldIndexed()) { HintContainer hintContainer = destField.getHintContainer(); if (hintContainer != null) { result = hintContainer.getHint(); } else if ((result.isArray() || (Collection.class.isAssignableFrom(result)) && MappingUtils.getSupportedCollectionEntryType(getDestPropertyDescriptor(runtimeDestClass)) != null)) { result = MappingUtils.getSupportedCollectionEntryType(getDestPropertyDescriptor(runtimeDestClass)); } else { result = Object.class; } } return result; }
public Class<?> getDestFieldType(Class<?> runtimeDestClass) { Class<?> result = getDestPropertyDescriptor(runtimeDestClass).getPropertyType(); if (isDestFieldIndexed()) { HintContainer hintContainer = destField.getHintContainer(); if (hintContainer != null) { result = hintContainer.getHint(); } else if ((result.isArray() || (Collection.class.isAssignableFrom(result)) && MappingUtils .getSupportedCollectionEntryType(getDestPropertyDescriptor(runtimeDestClass)) != null)) { result = MappingUtils.getSupportedCollectionEntryType(getDestPropertyDescriptor(runtimeDestClass)); } else { result = Object.class; } } return result; }
public Object getDestValue(Object runtimeDestObj) { return getDestPropertyDescriptor(BuilderUtil.unwrapDestClassFromBuilder(runtimeDestObj)).getPropertyValue(runtimeDestObj); }
/** * @deprecated As of 3.2 release */ @Deprecated public Method getDestFieldWriteMethod(Class<?> runtimeDestClass) { // 4-07 mht: The getWriteMethod was removed from the prop descriptor // interface. This was done as part of // refactoring effort to clean up the prop descriptor stuff. The // underlying write method should not be exposed. // For now, just explicitly cast to the only prop // descriptor(getter/setter) that could have been used in this // context. The other types of prop descriptors would have failed. DozerPropertyDescriptor dpd = getDestPropertyDescriptor(runtimeDestClass); Method result = null; try { result = ((GetterSetterPropertyDescriptor) dpd).getWriteMethod(); } catch (Exception e) { MappingUtils.throwMappingException(e); } return result; }
/** * @deprecated As of 3.2 release */ @Deprecated public Method getDestFieldWriteMethod(Class<?> runtimeDestClass) { // 4-07 mht: The getWriteMethod was removed from the prop descriptor // interface. This was done as part of // refactoring effort to clean up the prop descriptor stuff. The // underlying write method should not be exposed. // For now, just explicitly cast to the only prop // descriptor(getter/setter) that could have been used in this // context. The other types of prop descriptors would have failed. DozerPropertyDescriptor dpd = getDestPropertyDescriptor(runtimeDestClass); Method result = null; try { result = ((GetterSetterPropertyDescriptor) dpd).getWriteMethod(); } catch (Exception e) { MappingUtils.throwMappingException(e); } return result; }
public Class<?> getDestFieldType(Class<?> runtimeDestClass) { Class<?> result = null; if (isDestFieldIndexed()) { result = destHintContainer != null ? destHintContainer.getHint() : null; } if (result == null) { result = getDestPropertyDescriptor(runtimeDestClass).getPropertyType(); } return result; }
@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); }