Package org.springframework.beans

Examples of org.springframework.beans.BeanWrapperImpl$PropertyTokenHolder


    public static Object getPropertyValue(Object obj, String prop) {
        return (new BeanWrapperImpl(obj)).getPropertyValue(prop);
    }
   
    public static void setPropertyValue(Object obj, String prop, Object value) {
        (new BeanWrapperImpl(obj)).setPropertyValue(prop, value);
    }   
View Full Code Here


    public static void setPropertyValue(Object obj, String prop, Object value) {
        (new BeanWrapperImpl(obj)).setPropertyValue(prop, value);
    }   

    public static boolean hasProperty(Object obj, String prop) {
        return (new BeanWrapperImpl(obj)).isReadableProperty(prop);
    }
View Full Code Here

                        @Override
                        public void populateItem(final Item<ICellPopulator<AbstractSchemaTO>> item,
                                final String componentId, final IModel<AbstractSchemaTO> model) {

                            BeanWrapper bwi = new BeanWrapperImpl(model.getObject());
                            Object obj = bwi.getPropertyValue(field);

                            item.add(new Label(componentId, ""));
                            item.add(new AttributeModifier("class", new Model<String>(obj.toString())));
                        }
View Full Code Here

    return memberCollection.containsKey(id);
  }

  // alternative way of copying values
  public void copyValues(Member source, Member target, Iterable<String> properties) {
    BeanWrapper src = new BeanWrapperImpl(source);
    BeanWrapper trg = new BeanWrapperImpl(target);

    for(String propertyName : properties){
      trg.setPropertyValue(propertyName,src.getPropertyValue(propertyName)
      );
    }

  }
View Full Code Here

        fs.exists(new Path(path + "/test/" + DatasetUtils.getDatasetName(recordClass) + "/.metadata")));
    Collection<T> results = datasetOperations.read(recordClass);
    assertEquals(2, results.size());
    List<T> sorted = new ArrayList<T>(results);
    Collections.sort(sorted);
    BeanWrapper result = new BeanWrapperImpl(sorted.get(0));
    assertTrue(result.isReadableProperty("name"));
    assertTrue(result.getPropertyValue("name").equals("Sven"));
    assertTrue(result.isReadableProperty("id"));
    assertTrue(result.getPropertyValue("id").equals(22L));
    result = new BeanWrapperImpl(sorted.get(1));
    assertTrue(result.isReadableProperty("name"));
    assertTrue(result.getPropertyValue("name").equals("Nisse"));
    assertTrue(result.isReadableProperty("id"));
    assertTrue(result.getPropertyValue("id").equals(48L));
  }
View Full Code Here

            return null;
        }
       
        try {
           
            final BeanWrapperImpl wrapper = new BeanWrapperImpl(authentication);
            final Object propertyObj = wrapper.getPropertyValue(property);
           
            if (logger.isTraceEnabled()) {
                logger.trace("[THYMELEAF][{}] Property \"{}\" obtained from authentication object " +
                    "for user \"{}\". Returned value of class {}.",
                        new Object[] {TemplateEngine.threadIndex(), property, authentication.getName(),
View Full Code Here

  private BeanWrapper user;

  public UserBuilder(Organization org) {
    User target = new User();
    target.setOrganization(org);
    user = new BeanWrapperImpl(target);
  }
View Full Code Here

  private BeanWrapper authPolicy;

  public AuthenticationPolicyBuilder() {
    AuthenticationPolicy target = new AuthenticationPolicy();
    authPolicy = new BeanWrapperImpl(target);
  }
View Full Code Here

  public void findsRepositoryFactories() {

    DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory() {
      @Override
      protected BeanWrapper instantiateBean(String beanName, RootBeanDefinition mbd) {
        return beanName.equals("repoFactory") ? new BeanWrapperImpl(factory) : super.instantiateBean(beanName, mbd);
      }
    };

    beanFactory.registerBeanDefinition("postProcessor", new RootBeanDefinition(PredictingProcessor.class));
    beanFactory.registerBeanDefinition("repoFactory", new RootBeanDefinition(RepositoryFactoryBeanSupport.class));
View Full Code Here

     *
     * @param bean The bean to be wraped.
     * @return The bean wrapper that wraps the given bean.
     */
    protected BeanWrapper wrapBean(Object bean) {
        return new BeanWrapperImpl(bean);
    }
View Full Code Here

TOP

Related Classes of org.springframework.beans.BeanWrapperImpl$PropertyTokenHolder

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.