public void setValue(String name, Object value) { PropertyTokenizer prop = new PropertyTokenizer(name); if (prop.hasNext()) { MetaObject metaValue = metaObjectForProperty(prop.getIndexedName()); if (metaValue == MetaObjectUtils.NULL_META_OBJECT) { if (value == null && prop.getChildren() != null) { return; // don't instantiate child path if value is null } else { metaValue = objectWrapper.instantiatePropertyValue(name, prop, objectFactory); } } metaValue.setValue(prop.getChildren(), value); } else { objectWrapper.set(prop, value); } }
public Object getValue(String name) { PropertyTokenizer prop = new PropertyTokenizer(name); if (prop.hasNext()) { MetaObject metaValue = metaObjectForProperty(prop.getIndexedName()); if (metaValue == MetaObjectUtils.NULL_META_OBJECT) { return null; } else { return metaValue.getValue(prop.getChildren()); } } else { return objectWrapper.get(prop); } }
public Class<?> getGetterType(String name) { return objectWrapper.getGetterType(name); }
public boolean hasGetter(String name) { return objectWrapper.hasGetter(name); }
public String[] getSetterNames() { return objectWrapper.getSetterNames(); }
public String findProperty(String propName, boolean useCamelCaseMapping) { return objectWrapper.findProperty(propName, useCamelCaseMapping); }
public <E> void addAll(List<E> list) { objectWrapper.addAll(list); }
public void add(Object element) { objectWrapper.add(element); }
public boolean isCollection() { return objectWrapper.isCollection(); }