From: Nathan D. <na...@ch...> - 2002-11-01 17:40:35
|
I too struggled a bit with getAll() as part of the baseContentObject -- this too is a good candidate to be moved to the contentObjectUtility (which probably has only static methods and can live in memory). One issue is that you need to know which persister a given contentObject type is using before you can get all of them. The only clean way I can think of to do this is to have an instance of that type. I considered building some kind of "registry" of contentObject types, but that sounds very messy. Still, from an API viewpoint I agree it would be cleaner for getAll() to live outside of the baseContentObject. ------------------------- Sean and Jeremy: I would do the latter, put the handle attribute in the collection description. Which brings me to a nagging issue I have with OO in general - objects returning collections of themselves. Is it really "clean" to have a getAll() method in basecontentobject? I see this kind of thing all of the time in Java programs and it always makes me cringe. Yup. Legal but *ugly*... |