db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wang, Kevin" <KW...@TMRS.org>
Subject Using Torque to generate value class/JavaBeans
Date Wed, 01 Oct 2003 16:15:43 GMT
Our project uses CMP for persistance with WebSphere Application Server. It
also uses value classes (JavaBean) to assist the process. There is
one-to-one mapping between CMPs and db tables/views, and for the most part
one-to-one match between CMPs and value classes. Since value classes are
just plan JavaBeans with getter/setter for each table field. It would be
wise to generate them from tables/views and vise versa.

Can you achieve this with Torque? Without deep understanding of Torque, I
think it can be done by using a combination of Torque and Castor, plus
additional value class generator (VCGenerator , to be created). The
schema.xml generated by Torque can be fed to VCGenerator to create the value
class. Castor can be used to generate the helper classes to assist the
VCGenerator. For Castor to work in this case, an xml version of the Torque
dtd (database.dtd) would need to be converted.

Is there any other tool out there that will do such simple task?

Thanks,
Kevin

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


Mime
View raw message