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); }
public void setPropertyValue(Object bean, Object value, FieldMap fieldMap) { if (value == null && getPropertyType().isPrimitive()) { return; // do nothing } // Check if dest value is already set and is equal to src value. If true, no need to rewrite the dest value if (getPropertyValue(bean) == value) { return; } try { if (indexed) { Object existingValue = field.get(bean); Object collection = MappingUtils.prepareIndexedCollection(getPropertyType(), existingValue, value, index); field.set(bean, collection); } else { field.set(bean, value); } } catch (IllegalAccessException e) { MappingUtils.throwMappingException(e); } }
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 (value == null && getPropertyType().isPrimitive()) { return; // do nothing } // Check if dest value is already set and is equal to src value. If // true, no need to rewrite the dest value if (getPropertyValue(bean) == value) { return; } try { if (indexed) { Object existingValue = field.get(bean); if (!MappingUtils.isSimpleCollectionIndex(index)) { MappingUtils.throwMappingException("Destinaiton field path should not contain filter expressions"); } Object collection = MappingUtils.prepareIndexedCollection(getPropertyType(), existingValue, value, MappingUtils.getCollectionIndex(index)); field.set(bean, collection); } else { field.set(bean, value); } } catch (IllegalAccessException e) { MappingUtils.throwMappingException(e); } }
public void setPropertyValue(Object bean, Object value, FieldMap fieldMap) { if (value == null && getPropertyType().isPrimitive()) { return; // do nothing } // Check if dest value is already set and is equal to src value. If // true, no need to rewrite the dest value if (getPropertyValue(bean) == value) { return; } try { if (indexed) { Object existingValue = field.get(bean); if (!MappingUtils.isSimpleCollectionIndex(index)) { MappingUtils .throwMappingException("Destinaiton field path should not contain filter expressions"); } Object collection = MappingUtils.prepareIndexedCollection(getPropertyType(), existingValue, value, MappingUtils.getCollectionIndex(index)); field.set(bean, collection); } else { field.set(bean, value); } } catch (IllegalAccessException e) { MappingUtils.throwMappingException(e); } }
o = MappingUtils.prepareIndexedCollection(clazz, null, DestBeanCreator.create(clazz.getComponentType()), hierarchyElement.getIndex()); } else if (Collection.class.isAssignableFrom(clazz)) { o = MappingUtils.prepareIndexedCollection(clazz, null, DestBeanCreator.create(collectionEntryType), hierarchyElement .getIndex()); } else { value = MappingUtils.prepareIndexedCollection(pd.getPropertyType(), value, DestBeanCreator.create(collectionEntryType), hierarchyElement.getIndex());
o = MappingUtils.prepareIndexedCollection(clazz, null, DestBeanCreator.create(null, clazz .getComponentType()), collectionIndex); o = MappingUtils.prepareIndexedCollection(clazz, null, DestBeanCreator .create(null, collectionEntryType), collectionIndex); value = MappingUtils.prepareIndexedCollection(pd.getPropertyType(), value, DestBeanCreator.create(null, componentType), collectionIndex);
o = MappingUtils.prepareIndexedCollection(clazz, null, DestBeanCreator.create(null, clazz.getComponentType()), o = MappingUtils.prepareIndexedCollection(clazz, null, DestBeanCreator.create(null, collectionEntryType), value = MappingUtils.prepareIndexedCollection(pd.getPropertyType(), value, DestBeanCreator.create(null, componentType),