result = hierarchy[hierarchy.length - 1].getPropDescriptor(); } else { PropertyDescriptor[] descriptors = getPropertyDescriptors(objectClass);
result = hierarchy[hierarchy.length - 1].getPropDescriptor(); } else { PropertyDescriptor[] descriptors = getPropertyDescriptors(objectClass);
if (MappingUtils.isDeepMapping(fieldName)) { DeepHierarchyElement[] hierarchy = getDeepFieldHierarchy(objectClass, fieldName, deepIndexHintContainer); result = hierarchy[hierarchy.length - 1].getPropDescriptor(); } else { PropertyDescriptor[] descriptors = getPropertyDescriptors(objectClass);
private Object getDeepSrcFieldValue(Object srcObj) { // follow deep field hierarchy. If any values are null along the way, then return null Object parentObj = srcObj; Object hierarchyValue = parentObj; DeepHierarchyElement[] hierarchy = getDeepFieldHierarchy(srcObj, srcDeepIndexHintContainer); int size = hierarchy.length; for (int i = 0; i < size; i++) { DeepHierarchyElement hierarchyElement = hierarchy[i]; PropertyDescriptor pd = hierarchyElement.getPropDescriptor(); // If any fields in the deep hierarchy are indexed, get actual value within the collection at the specified index if (hierarchyElement.getIndex() > -1) { hierarchyValue = MappingUtils.getIndexedValue(ReflectionUtils.invoke(pd.getReadMethod(), hierarchyValue, null), hierarchyElement.getIndex()); } else { hierarchyValue = ReflectionUtils.invoke(pd.getReadMethod(), parentObj, null); } parentObj = hierarchyValue; if (hierarchyValue == null) { break; } } // If dest field is indexed, get actual value within the collection at the specified index if (isIndexed) { hierarchyValue = MappingUtils.getIndexedValue(hierarchyValue, index); } return hierarchyValue; }
PropertyDescriptor pd = hierarchyElement.getPropDescriptor(); hierarchyValue = MappingUtils.getCollectionIndexedValue(hierarchyValue, collectionIndex); } else { String lastFieldName = hierarchy[hierarchyLength - 1].getPropDescriptor().getName(); String expression = String.format("%s[%s]", lastFieldName, index); hierarchyValue = MappingUtils.getXPathIndexedValue(parentObj, expression);
PropertyDescriptor pd = hierarchyElement.getPropDescriptor(); hierarchyValue = MappingUtils.getCollectionIndexedValue(hierarchyValue, collectionIndex); } else { String lastFieldName = hierarchy[hierarchyLength - 1].getPropDescriptor().getName(); String expression = String.format("%s[%s]", lastFieldName, index); hierarchyValue = MappingUtils.getXPathIndexedValue(parentObj, expression);
for (int i = 0; i < hierarchyLength; i++) { DeepHierarchyElement hierarchyElement = hierarchy[i]; PropertyDescriptor pd = hierarchyElement.getPropDescriptor(); Object value = ReflectionUtils.invoke(pd.getReadMethod(), parentObj, null); Class<?> clazz; PropertyDescriptor pd = hierarchy[hierarchy.length - 1].getPropDescriptor();
PropertyDescriptor pd = hierarchyElement.getPropDescriptor(); Object value = ReflectionUtils.invoke(pd.getReadMethod(), parentObj, null); Class<?> clazz; MappingUtils.throwMappingException(String.format( "Destination field '%s' should be indexed or should not contain filter expressions", hierarchyElement.getPropDescriptor().getName())); PropertyDescriptor pd = hierarchy[hierarchy.length - 1].getPropDescriptor();
PropertyDescriptor pd = hierarchyElement.getPropDescriptor(); Object value = ReflectionUtils.invoke(pd.getReadMethod(), parentObj, null); Class<?> clazz; MappingUtils.throwMappingException(String.format( "Destination field '%s' should be indexed or should not contain filter expressions", hierarchyElement.getPropDescriptor().getName())); PropertyDescriptor pd = hierarchy[hierarchy.length - 1].getPropDescriptor();