Example #1
0
 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);
   }
 }
Example #2
0
 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);
   }
 }
Example #3
0
 public Class<?> getGetterType(String name) {
   return objectWrapper.getGetterType(name);
 }
Example #4
0
 public boolean hasGetter(String name) {
   return objectWrapper.hasGetter(name);
 }
Example #5
0
 public String[] getSetterNames() {
   return objectWrapper.getSetterNames();
 }
Example #6
0
 public String findProperty(String propName, boolean useCamelCaseMapping) {
   return objectWrapper.findProperty(propName, useCamelCaseMapping);
 }
Example #7
0
 public <E> void addAll(List<E> list) {
   objectWrapper.addAll(list);
 }
Example #8
0
 public void add(Object element) {
   objectWrapper.add(element);
 }
Example #9
0
 public boolean isCollection() {
   return objectWrapper.isCollection();
 }