views:

122

answers:

3

Hi,

is there a utility out there for creating a bean (which has simple String attributes whose name match with HashMap keys ) given bean class as input along with properly set hashmap?

thanks, Amit

+1  A: 

Apache Commons BeanUtils should be able to help you - since it's used for "bean" operations by many other frameworks. A "DynaBean" looks close to that.

Adrian A.
A: 

My suggestion is to go for Dozer. I have been using it (for 3 years) for map-bean transformation and it works great. It also integrates well with Spring

Pangea
A: 

Hi, org.apache.commons.beanutils.BeanMap did the trick for me.

Thanks!

Amit