Christopher Bradford wrote:

Sorry, I wasn't clear. In my last example, the DAO.read(id) *does* create a BO (or TO or whatever you choose) and returns it to the Manager.

And this fits with my preference of C to answer your original question.

Caller calls BOManager.getBO(id)
BOManager checks its pool and has a couple of options:

- Return the existing BO from the pool
- Call DAO.read(id)
- If the DAO returns a BO, the Manager can replace an existing BO in its pool with the one returned from the DAO and return it
- If the DAO returns a TO, the Manager can reset and populate an existing BO from the pool with the data in the TO, or it can instantiate a new BO and populate from the TO, then replace an existing BO from the pool and return it


In none of these cases does the BO to be populated need to be passed to the DAO, and the DAO doesn't have to know anything but the database and the BO (or TO) it's populating

Christopher Bradford

Are you passing in an empty bean (BO) or TO to the DAO? Or are you having the DAO create the bean or TO from inside of the DAO?


--
Peter J. Farrell :: Maestro Publishing

blog    :: http://blog.maestropublishing.com
email   :: [EMAIL PROTECTED]
phone   :: 651-204-0513

I've learned that artificial intelligence is no match for natural stupidity.
--



----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]




Reply via email to