Hi Kevin, from what I can glean from their website, torque implements what Martin Fowler calls the Gateway pattern - tables are directly related to classes - but I need his DataMapper pattern (where a finder object finds the data and a mapper turns it into anything you like).
Adam [EMAIL PROTECTED] wrote: > >Adam - > >Have you looked at Torque from the Jakarta Tubine project? > >I haven't used it but have heard good things about it. It provides an >ability to perform O/R mapping using an XML configuration file - and (as I >understand) it creates Java files for you that implement a peristence >layer. > >FWIW - >Kevin > > > > >Adam Hardy <[EMAIL PROTECTED]> on 05/29/2002 12:44:28 PM > >Please respond to "Struts Users Mailing List" > <[EMAIL PROTECTED]> > >To: Struts Users Mailing List <[EMAIL PROTECTED]> >cc: (bcc: Kevin Bedell/Systems/USHO/SunLife) >Subject: Design Advice - Relational Databases & Java Objects > > >Hi All, > >I saw this thread in the archives and I thought I'd pinch the title. >I've spent this afternoon surfing the web looking at stuff on Sun, >Jakarta and lots of smaller sites looking for a ready-made data access >layer package but I take it there isn't an open-source one out there. > >Obviously I don't want to tie my data access layer to struts, so there >are a few questions I've got. > >(1) Is it best for the data access layer to throw exceptions on error to >be picked up by the business objects & then struts actions, or would it >be good to use a struts-type message object and use strings in the >application resources file (I'm just worried my exceptions' text would >not be multi-lingual) > >(2) How would I get the database connection info to the data access >layer? Presuming I want to set it up in struts-config.xml or as in >commons-dbcp, would I then pass it in from struts actions into the >business object and then into the data access layer as a parameter on >each call? > > > >I've seen quite a few patterns like www.martinfowler.com and code like >in Sun's Pet Store, so I think I've got a fairly good idea of what I >need. The data access layer I want has got to: > >- take as input and return as output Data Transport Objects >- allow the business objects to control transactions >- use a connection pool >- possibly keep the SQL statements in an external XML file >- have comprehensive error handling & reporting > > > > >-- >To unsubscribe, e-mail: < >mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: < >mailto:[EMAIL PROTECTED]> > > > > > > > >--------------------------------------------------------------------------- >This e-mail message (including attachments, if any) is intended for the use >of the individual or entity to which it is addressed and may contain >information that is privileged, proprietary , confidential and exempt from >disclosure. If you are not the intended recipient, you are notified that >any dissemination, distribution or copying of this communication is >strictly prohibited. If you have received this communication in error, >please notify the sender and erase this e-mail message immediately. >--------------------------------------------------------------------------- > > >-- >To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>