private void writeIndexedValue(Object destObj, int collectionIndex, Object existingValue, Object destFieldValue) { Object indexedValue = MappingUtils.prepareIndexedCollection(getPropertyType(), existingValue, destFieldValue, collectionIndex); invokeWriteMethod(destObj, indexedValue); }
private void writeIndexedValue(Object destObj, int collectionIndex, Object existingValue, Object destFieldValue) { Object indexedValue = MappingUtils.prepareIndexedCollection(getPropertyType(), existingValue, destFieldValue, collectionIndex); invokeWriteMethod(destObj, indexedValue); }
private void writeIndexedValue(Object destObj, Object destFieldValue) { Object existingValue = invokeReadMethod(destObj); Object indexedValue = MappingUtils.prepareIndexedCollection(getPropertyType(), existingValue, destFieldValue, index); invokeWriteMethod(destObj, indexedValue); }
public void setPropertyValue(Object bean, Object value, FieldMap fieldMap) { if (MappingUtils.isDeepMapping(fieldName)) { writeDeepDestinationValue(bean, value, fieldMap); } else { if (!getPropertyType().isPrimitive() || value != null) { //First check if value is indexed. If it's null, then the new array will be created if (isIndexed) { writeIndexedValue(bean, value); } else { // Check if dest value is already set and is equal to src value. If true, no need to rewrite the dest value try { if (getPropertyValue(bean) == value && !isIndexed) { return; } } catch (Exception e) { // if we failed to read the value, assume we must write, and continue... } invokeWriteMethod(bean, value); } } } }
public void setPropertyValue(Object bean, Object value, FieldMap fieldMap) { if (MappingUtils.isDeepMapping(fieldName)) { writeDeepDestinationValue(bean, value, fieldMap); } else { if (!getPropertyType().isPrimitive() || value != null) { // First check if value is indexed. If it's null, then the new // array will be created if (isIndexed) { // write value using index information // writeIndexedValue(bean, value); } else { // Check if dest value is already set and is equal to src // value. If true, no need to rewrite the dest value try { if (getPropertyValue(bean) == value && !isIndexed) { return; } } catch (Exception e) { // if we failed to read the value, assume we must write, // and continue... } invokeWriteMethod(bean, value); } } } }
public void setPropertyValue(Object bean, Object value, FieldMap fieldMap) { if (MappingUtils.isDeepMapping(fieldName)) { writeDeepDestinationValue(bean, value, fieldMap); } else { if (!getPropertyType().isPrimitive() || value != null) { // First check if value is indexed. If it's null, then the new // array will be created if (isIndexed) { // write value using index information // writeIndexedValue(bean, value); } else { // Check if dest value is already set and is equal to src // value. If true, no need to rewrite the dest value try { if (getPropertyValue(bean) == value && !isIndexed) { return; } } catch (Exception e) { // if we failed to read the value, assume we must write, // and continue... } invokeWriteMethod(bean, value); } } } }