thanks for that link - that about sums it up :O)
On Mon, 24 Jan 2005 11:18:30 -0800, Phil Cruz <[EMAIL PROTECTED]> wrote: > That's what I do in the mach-ii.info sample app which is what Sun > describes in the Core J2EE patterns > (http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html) > > -Phil > > On Mon, 24 Jan 2005 14:11:36 -0500, Bill Rawlinson > <[EMAIL PROTECTED]> wrote: > > HI, > > > > Just looking for the consensus opinion on this one. I am building a > > system with a bunch of objects, say 10, that are each has a > > corresponding bean and DAO. > > > > Currently, I have a DAO factory for each object say Object1DAOFactory > > and Object2DAOFactory etc.. > > > > Now, what I am thinking is maybe I could just create a > > genericDAOFactory that I can use to create the correct DAO as needed. > > > > I figure to do this I could have a single method in GenericDAOFactory > > called getDAO with a single argument of either ObjectName type String > > - or - ObjectBean of type Any > > > > If I use the first option (ObjectName) the factory just runs through a > > switch (or something) and creates a instance of the correct DAO and > > returns it. If I pass in the ObjectBean then the factory determines > > the type of object and then creates and instance of the DAO and > > returns it. > > > > Now my question to you is: Is this genericDAOFactory a good idea? It > > seems like it might be - I only have one factory to maintain and the > > method, either way, is fairly simple. > > > > However, I am torn - I'm not so sure I want to have this kind of logic > > in the factory which is really just responsible for returning me the > > correct DAO (basic, sql, xml, etc..) > > > > so what do you think? > > > > Thanks in advance > > -- > > [EMAIL PROTECTED] > > http://blog.rawlinson.us > > > > I have 9 gmail invites,want one? > > ---------------------------------------------------------- > > You are subscribed to cfcdev. To unsubscribe, send an email > > to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' > > in the message of the email. > > > > CFCDev is run by CFCZone (www.cfczone.org) and supported > > by Mindtool, Corporation (www.mindtool.com). > > > > An archive of the CFCDev list is available at > > www.mail-archive.com/[email protected] > > > ---------------------------------------------------------- > You are subscribed to cfcdev. To unsubscribe, send an email > to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' > in the message of the email. > > CFCDev is run by CFCZone (www.cfczone.org) and supported > by Mindtool, Corporation (www.mindtool.com). > > An archive of the CFCDev list is available at > www.mail-archive.com/[email protected] > -- [EMAIL PROTECTED] http://blog.rawlinson.us I have 9 gmail invites,want one? ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
