@Test public void testWithStringPropertyType() { BeanWrapperUpdater updater = new BeanWrapperUpdater("name"); Person person = new Person(); assertNull(person.getName()); updater.update(person, "Ivan"); assertEquals("Ivan", person.getName()); }
public void update(Object target, Object value) { BeanWrapper bw = new BeanWrapperImpl(target); bw.registerCustomEditor(Date.class, new CustomDateEditor(new SimpleDateFormat("yyyy-MM-dd"), true)); bw.setPropertyValue(propertyName, value); }
BeanWrapperUpdater implements Updater, Serializable, PortableObject { public void update(Object target, Object value) { BeanWrapper bw = new BeanWrapperImpl(target); bw.registerCustomEditor(Date.class, new CustomDateEditor(new SimpleDateFormat("yyyy-MM-dd"), true)); bw.setPropertyValue(propertyName, value); } }
BeanWrapperUpdater implements Updater, Serializable, PortableObject { public void update(Object target, Object value) { BeanWrapper bw = new BeanWrapperImpl(target); bw.registerCustomEditor(Date.class, new CustomDateEditor(new SimpleDateFormat("yyyy-MM-dd"), true)); bw.setPropertyValue(propertyName, value); } BeanWrapperUpdater();  BeanWrapperUpdater(String propertyName); }
BeanWrapperUpdater implements Updater, Serializable, PortableObject { public void update(Object target, Object value) { BeanWrapper bw = new BeanWrapperImpl(target); bw.registerCustomEditor(Date.class, new CustomDateEditor(new SimpleDateFormat("yyyy-MM-dd"), true)); bw.setPropertyValue(propertyName, value); } BeanWrapperUpdater();  BeanWrapperUpdater(String propertyName); void update(Object target, Object value); void readExternal(PofReader reader); void writeExternal(PofWriter writer); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
BeanWrapperUpdater implements Updater, Serializable, PortableObject { public void update(Object target, Object value) { BeanWrapper bw = new BeanWrapperImpl(target); bw.registerCustomEditor(Date.class, new CustomDateEditor(new SimpleDateFormat("yyyy-MM-dd"), true)); bw.setPropertyValue(propertyName, value); } BeanWrapperUpdater();  BeanWrapperUpdater(String propertyName); void update(Object target, Object value); void readExternal(PofReader reader); void writeExternal(PofWriter writer); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }