@Override public Collection filter(String fieldId, Collection source) { Collection o = super.filter(fieldId, source); Collection target = findCollection(o); fillCollection(source, target); return o; }
@Override public Filterable filter(String fieldId, Filterable source) { Filterable o = super.filter(fieldId, source); ModelBased target = (ModelBased) findTarget(o); fillTarget(source, target); return o; }
for (int i = 0; i < length; i++) { Object currentValue = Array.get(current, i); Object targetValue = this.filter("ARRAY", currentValue); Array.set(target, i, targetValue); log.error("Error creating new array of type " + componentType, e); throwOnNewInstanceException(current, componentType, e); targetType = findClass(currentType); log.error("Error creating new instance of target type" + current, e); throwOnNewInstanceException(current, targetType, e);
private void fillMap(Map source, Map target) { if (source != null && target != null) { for (Iterator it = source.keySet().iterator(); it.hasNext();) { Object o = it.next(); target.put(findKeyTarget(o), findCollectionTarget(source.get(o))); } } }
public ModelBased map(Filterable source) { Filterable o = this.filter("MAPPING...", source); return (ModelBased) model2target.get(o); }
private void fillCollection(Collection source, Collection target) { if (source != null && target != null) { for (Iterator it = source.iterator(); it.hasNext();) { Object o = it.next(); target.add(this.findCollectionTarget(o)); } } }
protected Class findClass(Class source) { return (Class) c2c().get(Utils.trueClass(source)); }
public Collection map(Collection source) { Collection o = this.filter("MAPPING...", source); return (Collection) model2target.get(o); }
public Map map(Map source) { Map o = this.filter("MAPPING...", source); return (Map) model2target.get(o); }