Package org.apache.commons.beanutils

Examples of org.apache.commons.beanutils.PropertyUtilsBean


            if (log.isTraceEnabled())
                log.trace(bean.getClass().getName() + ": setting property '" + property + "' to " + String.valueOf(value));
            */
           
            // Get Property Value
            PropertyUtilsBean pub = BeanUtilsBean.getInstance().getPropertyUtils();
            return pub.getSimpleProperty(bean, property);
           
            // Check result
            /*
             * String res = BeanUtils.getProperty(bean, property); if (res!=value && res.equals(String.valueOf(value))==false) { //
             * Property value cannot be set // (missing setter?) String msg = bean.getClass().getName() + ": unable to set
View Full Code Here


            if (log.isTraceEnabled())
                log.trace(bean.getClass().getName() + ": getting property '" + property + "' for column " + column.getName());
            */
           
            // Get Property Value
            PropertyUtilsBean pub = BeanUtilsBean.getInstance().getPropertyUtils();
            Object value = pub.getSimpleProperty(bean, property);

            // Now, set the record value
            return setValue( column, value );

        } catch (IllegalAccessException e)
View Full Code Here

            return null;
        }
        try
        {   // Get Property Value
            clearError();
            PropertyUtilsBean pub = BeanUtilsBean.getInstance().getPropertyUtils();
            return pub.getSimpleProperty(bean, property);

        } catch (IllegalAccessException e)
        {   log.error(bean.getClass().getName() + ": unable to get property '" + property + "'");
            error(e);
            return null;
View Full Code Here

     * @return the {@code BeanUtilsBean} instance to be used for all property
     *         set operations
     */
    private static BeanUtilsBean initBeanUtilsBean()
    {
        PropertyUtilsBean propUtilsBean = new PropertyUtilsBean();
        propUtilsBean.addBeanIntrospector(new FluentPropertyBeanIntrospector());
        return new BeanUtilsBean(new ConvertUtilsBean(), propUtilsBean);
    }
View Full Code Here

        return result;
    }

    private static MBeanAttributeInfo[] getAttributes(Object theObject) throws ReflectionException {
        MBeanAttributeInfo[] result = null;
        PropertyUtilsBean beanUtil = new PropertyUtilsBean();
        PropertyDescriptor[] pds = beanUtil.getPropertyDescriptors(theObject);
        if (pds != null) {
            result = new MBeanAttributeInfo[pds.length];
            for (int i = 0;i < pds.length;i++) {
                try {
                    result[i] = new MBeanAttributeInfo(pds[i].getName(), pds[i].getShortDescription(), pds[i]
View Full Code Here

            if (log.isTraceEnabled())
                log.trace(bean.getClass().getName() + ": getting property '" + property + "' for column " + column.getName());
            */
           
            // Get Property Value
            PropertyUtilsBean pub = BeanUtilsBean.getInstance().getPropertyUtils();
            Object value = pub.getSimpleProperty(bean, property);

            // Now, set the record value
            return setValue( column, value );

        } catch (IllegalAccessException e)
View Full Code Here

            return null;
        }
        try
        {   // Get Property Value
            clearError();
            PropertyUtilsBean pub = BeanUtilsBean.getInstance().getPropertyUtils();
            return pub.getSimpleProperty(bean, property);

        } catch (IllegalAccessException e)
        {   log.error(bean.getClass().getName() + ": unable to get property '" + property + "'");
            error(e);
            return null;
View Full Code Here

            throw new InvalidArgumentException("bean", bean);
        if (property==null)
            throw new InvalidArgumentException("property", property);
        try
        {   // Get Property Value
            PropertyUtilsBean pub = BeanUtilsBean.getInstance().getPropertyUtils();
            return pub.getSimpleProperty(bean, property);

        } catch (IllegalAccessException e)
        {   log.error(bean.getClass().getName() + ": unable to get property '" + property + "'");
            throw new BeanPropertyGetException(bean, property, e);
        } catch (InvocationTargetException e)
View Full Code Here

            if (log.isTraceEnabled())
                log.trace(bean.getClass().getName() + ": getting property '" + property + "' for column " + column.getName());
            */
           
            // Get Property Value
            PropertyUtilsBean pub = BeanUtilsBean.getInstance().getPropertyUtils();
            Object value = pub.getSimpleProperty(bean, property);

            // Now, set the record value
            setValue( column, value );

        } catch (IllegalAccessException e)
View Full Code Here

                        properties.put(param.substring(
                                PARAM_NAME_PREFIX.length()), ctx.getRequest().getParameter(param));
                    }
                }
               
                new BeanUtilsBean(CONVERTER_UTILS_BEAN, new PropertyUtilsBean())
                        .populate(searchParams, properties);

            } catch (Exception e) {
                Throwable cause = e.getCause() != null ? e.getCause() : e;
                if (cause instanceof InvocationTargetException
View Full Code Here

TOP

Related Classes of org.apache.commons.beanutils.PropertyUtilsBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.