Package org.apache.commons.beanutils

Examples of org.apache.commons.beanutils.BeanMap


  private BeanMap wrappedBeanMap;

  protected E object;

  public Decorator(E wrapped) {
    this.decoratorBeanMap = new BeanMap(this);
    this.wrappedBeanMap = new BeanMap(wrapped);
    this.object = wrapped;
  }
View Full Code Here


          + result.getClass().getSimpleName() + "]");
     
      return;
    }

    BeanMap beanMap = new BeanMap(result);

    for (Iterator<?> itProperty = beanMap.keyIterator(); itProperty
        .hasNext();) {
      String propertyName = "" + itProperty.next();
      Object propertyValue = beanMap.get(propertyName);

      if ("class".equals(propertyName))
        continue;

      if (null == propertyValue)
        continue;

      Class<?> propertyClass = null;

      try {
        propertyClass = beanMap.getType(propertyName);
      } catch (Exception e) {
        getLog().warn("Failure on property " + propertyName, e);
      }
     
      if (null == propertyClass) {
View Full Code Here

    for ( Object needleItem : haystack ) {
      try {
        if ( needleItem instanceof Map ) {
          contains( (Map) needleItem, itemToFind );
        } else {
          contains( new BeanMap( needleItem ), itemToFind );
        }
        found.add( true );
      }
      catch ( AssertionError e ) {
        found.add( false );
View Full Code Here

    Map<String, String> values = new HashMap<String, String>();
    for ( String property : properties ) {
      values.put( property, null );
    }
    Map entities = new BeanMap( entity );
    mapChecker.contains( entities, values );
  }
View Full Code Here

    Object entity = spel.getValue( spelExpressionOne );

    Map<String, String> values = new HashMap<String, String>();
    values.put( propertyName, propertyValue );

    Map entities = new BeanMap( entity );
    mapChecker.contains( entities, values );
  }
View Full Code Here

      }
    }
    if ( numberOfCells == 2 ) {
      values = dataTable.asMap( String.class, String.class );
    }
    Map entities = new BeanMap( entity );
    mapChecker.contains( entities, values );
  }
View Full Code Here

          + result.getClass().getSimpleName() + "]");
     
      return;
    }

    BeanMap beanMap = new BeanMap(result);

    for (Iterator<?> itProperty = beanMap.keyIterator(); itProperty
        .hasNext();) {
      String propertyName = "" + itProperty.next();
      Object propertyValue = beanMap.get(propertyName);

      if ("class".equals(propertyName))
        continue;

      if (null == propertyValue)
        continue;

      Class<?> propertyClass = null;

      try {
        propertyClass = beanMap.getType(propertyName);
      } catch (Exception e) {
        getLog().warn("Failure on property " + propertyName, e);
      }
     
      if (null == propertyClass) {
View Full Code Here

          + result.getClass().getSimpleName() + "]");
     
      return;
    }

    BeanMap beanMap = new BeanMap(result);

    for (Iterator<?> itProperty = beanMap.keyIterator(); itProperty
        .hasNext();) {
      String propertyName = "" + itProperty.next();
      Object propertyValue = beanMap.get(propertyName);

      if ("class".equals(propertyName))
        continue;

      if (null == propertyValue)
        continue;

      Class<?> propertyClass = null;

      try {
        propertyClass = beanMap.getType(propertyName);
      } catch (Exception e) {
        getLog().warn("Failure on property " + propertyName, e);
      }
     
      if (null == propertyClass) {
View Full Code Here

   * @throws FeedServerClientException if any problems exist with the bean.
   */
  private Object getBeanProperty(String propertyName, T bean) throws
      FeedServerClientException {
    try {
      BeanMap beanMap = new BeanMap(bean);
      return beanMap.get(propertyName);
    } catch (IllegalArgumentException e) {
      throw new RuntimeException("Invalid bean " + bean.getClass().getName(), e);
    } catch (SecurityException e) {
      throw new RuntimeException("Invalid bean " + bean.getClass().getName(), e);
    }
View Full Code Here

TOP

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

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.