public static Object getMappedProperty(Object bean, String name, String key) { try { return org.apache.commons.beanutils.PropertyUtils.getMappedProperty(bean, name, key); }catch(Exception e) { handleException(e); return null; } }
public static Object getMappedProperty(Object bean, String name) { try { return org.apache.commons.beanutils.PropertyUtils.getMappedProperty(bean, name); }catch(Exception e) { handleException(e); return null; } }
/** * Return the value of a mapped property with the specified name, * or <code>null</code> if there is no value for the specified key. * * @param name Name of the property whose value is to be retrieved * @param key Key of the value to be retrieved * @return The mapped property's value * * @exception IllegalArgumentException if there is no property * of the specified name * @exception IllegalArgumentException if the specified property * exists, but is not mapped */ public Object get(String name, String key) { Object value = null; try { value = PropertyUtils.getMappedProperty(instance, name, key); } catch (InvocationTargetException ite) { Throwable cause = ite.getTargetException(); throw new IllegalArgumentException ("Error reading mapped property '" + name + "' nested exception - " + cause); } catch (Throwable t) { throw new IllegalArgumentException ("Error reading mapped property '" + name + "', exception - " + t); } return (value); }
/** * Return the value of a mapped property with the specified name, * or <code>null</code> if there is no value for the specified key. * * @param name Name of the property whose value is to be retrieved * @param key Key of the value to be retrieved * @return The mapped property's value * * @exception IllegalArgumentException if there is no property * of the specified name * @exception IllegalArgumentException if the specified property * exists, but is not mapped */ public Object get(String name, String key) { Object value = null; try { value = PropertyUtils.getMappedProperty(instance, name, key); } catch (InvocationTargetException ite) { Throwable cause = ite.getTargetException(); throw new IllegalArgumentException ("Error reading mapped property '" + name + "' nested exception - " + cause); } catch (Throwable t) { throw new IllegalArgumentException ("Error reading mapped property '" + name + "', exception - " + t); } return (value); }
/** * Return the value of a mapped property with the specified name, * or <code>null</code> if there is no value for the specified key. * * @param name Name of the property whose value is to be retrieved * @param key Key of the value to be retrieved * @return The mapped property's value * * @exception IllegalArgumentException if there is no property * of the specified name * @exception IllegalArgumentException if the specified property * exists, but is not mapped */ public Object get(String name, String key) { Object value = null; try { value = PropertyUtils.getMappedProperty(instance, name, key); } catch (InvocationTargetException ite) { Throwable cause = ite.getTargetException(); throw new IllegalArgumentException ("Error reading mapped property '" + name + "' nested exception - " + cause); } catch (Throwable t) { throw new IllegalArgumentException ("Error reading mapped property '" + name + "', exception - " + t); } return (value); }
evalBean = PropertyUtils.getMappedProperty(evalBean, next); evalBean = PropertyUtils.getMappedProperty(evalBean, evalName);
evalBean = PropertyUtils.getMappedProperty(evalBean, next); evalBean = PropertyUtils.getMappedProperty(evalBean, evalName);
while (resolver.hasNested(propertyName)) { String next = resolver.next(propertyName); Object nestedBean = resolver.isMapped(next) ? PropertyUtils.getMappedProperty(bean, next) : resolver.isIndexed(next) ? PropertyUtils.getIndexedProperty(bean, next) : PropertyUtils.getSimpleProperty(bean, next);