Please help:
if property of my class's setter and setter method arguments type doesn’t 
match, how can i populate bean object?

public class Foo extends SomeClass{
private int id;

@Override
public Object getId() {
  return id;
}

public void setId(int id) {
   this.id = id;
}
}

// testing
Foo foot = new Foo();
Map<String,Object> values = new HashMap<String,Object>();
values.put(“id”,”1000”);
BeanUtils.populate(foo, values);
logger.debug(foo);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to