I think i'll take your second option. I could make something work with 
serializable as said Martin (and confirmed by you), but if we decide a day to 
change the way to make data persistent, many frameworks exist for POJOs (eg. 
hibernate).
And Benautils provides :
BeanUtilsBean.populate(bean,map)
BeanUtilsBean.copyProperties(bean,bean)
So even i must maintain an other class, this is propably the best way.
Thanks Martin and Laurie.

Le Lundi 18 Juillet 2005 19:07, Laurie Harper a écrit :
> Dewitte Rémi wrote:
> > Hello !
> > I uses LazyDynaForm to gather user results.
> > Now I'd like to save those results. All persisence framework are for
> > POJO, do you know a common solution ?
> > May I create a POJO to make the transition/link ?
>
> It all depends on your requirements and what persistence technologies you
> want to use. As Martin said, your LazyDynaForms are Serializable so you can
> write them to an object stream as with any other Serializable class. Many
> persistence frameworks, including (most?) ORM tools can persist
> Serializable instances directly.
>
> Your other option is to define a concrete POJO which you can map to
> persistent storage using your chosen solution and copy data from your
> LazyDyanForm into your POJO prior to persisting. BeanUtils can make it
> pretty trivial (sometimes as little as a single line of code) to manage the
> copying of data between form beans and POJOs.
>
> If that doesn't help, you might want to post a more detailed description of
> what you want to do.
>
> L.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to