Dynabean is one of the treasures in Beanutils. With a dynamic bean, you don't have to write so many VOs, especially those that are just to interact with View, i Hate Form Bean.
Dynabean usage is simple, especially after lazybynabean.
Dynabean car = new lazydynabean (); car.set ("carno", 1); car.set ("Owner", "Zhang 3");
Out.print (car.get ("carno"));
Look at a function like a MAP, but more reflection, so supports those who use reflection to obtain attributes.
But because he doesn't have a function such as Car.Getcarno (), you can only use car.get ("carno"), so you don't support the
Finally, if car.set ("carno", null) gets an inexplicable object object, if you want it to null, you need to define his type first. Therefore, for columns that may be null, you need to define type with lazyclass, but fortunately, it is also very lazy, it is impossible to be NULL values.
Lazydynaclass lc = new lazydynaclass (); lc.add ("owner", string.class); // Specify NULL Converter String Dynabean Car = New Lazy Dynabean (LC); Car.Set ("Carno", 1); Car.set ("Owner", NULL;