Il giorno 31/lug/05, alle 14:01, Leszek Gawron ha scritto:

I have defined a custom type and convertor for that. The convertor is actually managed by Spring and populated with a DAO and the convertor's factory returns the Spring-managed instance instead of creating a new one.
The convertor itself is spring manager or just the dao it holds?

Both.

Do I get it right that you need to implement a separate:

- dao
- convertor
- convertor builder

for every domain object in your model?

Not really. I do it only for those types that are reused across many forms and therefore warrant defining a datatype and convertor. At the moment, we have developed datatypes for a bunch of "geographical" objects like Town, Province, Country, that are used in all the forms where you have to input an address. And we have a single "GeoDAO" class for all entities of this kind.

In general, I would do this for every "datatype" that is implemented as a look-up-table (key => value) in the database and is reused in more than a couple of forms, or across more than one different project.

        Ugo

--
Ugo Cei
Tech Blog: http://agylen.com/
Open Source Zone: http://oszone.org/
Wine & Food Blog: http://www.divinocibo.it/

Reply via email to