/** * Removes field maps from class map what are overridden. * * @param copy copy of class map * @param overriddenFieldMappings keys of overridden field mappings * @param destObj destination object */ private void removeOverriddenFieldMappings(ClassMap copy, List<String> overriddenFieldMappings, Object destObj) { List<FieldMap> result = new ArrayList<FieldMap>(); for (FieldMap fieldMap : copy.getFieldMaps()) { String key = MappingUtils.getMappedParentFieldKey(destObj, fieldMap); if (!overriddenFieldMappings.contains(key)) { result.add(fieldMap); } } copy.setFieldMaps(result); }
/** * Removes field maps from class map what are overridden. * * @param copy copy of class map * @param overriddenFieldMappings keys of overridden field mappings * @param destObj destination object */ private void removeOverriddenFieldMappings(ClassMap copy, List<String> overriddenFieldMappings, Object destObj) { List<FieldMap> result = new ArrayList<FieldMap>(); for (FieldMap fieldMap : copy.getFieldMaps()) { String key = MappingUtils.getMappedParentFieldKey(destObj, fieldMap); if (!overriddenFieldMappings.contains(key)) { result.add(fieldMap); } } copy.setFieldMaps(result); }
public ClassMap copyOf() { ClassMap copy = new ClassMap(this.globalConfiguration); copy.setSrcClass(srcClass); copy.setDestClass(destClass); copy.setFieldMaps(new ArrayList<FieldMap>(fieldMaps)); copy.setAllowedExceptions(new ArrayList<Class<RuntimeException>>(allowedExceptions)); copy.setType(type); copy.setDateFormat(dateFormat); copy.setBeanFactory(beanFactory); copy.setMapNull(mapNull); copy.setMapEmptyString(mapEmptyString); copy.setWildcard(wildcard); copy.setStopOnErrors(stopOnErrors); copy.setTrimStrings(trimStrings); copy.setCustomConverters(customConverters); copy.setMapId(mapId); copy.setRelationshipType(relationshipType); return copy; } }
public ClassMap copyOf() { ClassMap copy = new ClassMap(this.globalConfiguration); copy.setSrcClass(srcClass); copy.setDestClass(destClass); copy.setFieldMaps(new ArrayList<FieldMap>(fieldMaps)); copy.setAllowedExceptions(new ArrayList<Class<RuntimeException>>(allowedExceptions)); copy.setType(type); copy.setDateFormat(dateFormat); copy.setBeanFactory(beanFactory); copy.setMapNull(mapNull); copy.setMapEmptyString(mapEmptyString); copy.setWildcard(wildcard); copy.setStopOnErrors(stopOnErrors); copy.setTrimStrings(trimStrings); copy.setCustomConverters(customConverters); copy.setMapId(mapId); copy.setRelationshipType(relationshipType); return copy; } }