db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <d...@solaraccess.com>
Subject Re: Data object Class Implementation
Date Wed, 17 Mar 2004 02:20:35 GMT
On Tue, 2004-03-16 at 15:06, Pedro Salgado wrote:
>   Why donĀ¹t you use a regular java bean and populate it with the values
> retrieved from the model (database)? Fetch the data using the DAO and then
> pass it to the bean... Something like:
>   view.setPersonName(dao.getName());

Just to further this idea...

With clever naming conventions you can use the commons beanutils to
one-line copy properties from one class to another. Very nice.

It's always good to hide the DB from all the other layers (I'm currently
contracting on a project where the torque objects get sent to the
presentation layer, which makes me a little nervous, although in our
case it's probably okay given the circumstances.)


To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org

View raw message