Hi,
I've got a concept i
need to bounce off others, its similiar in its approach to say "Articles" has
many "Comments" (ie Article has-a comment(s)).
In my Approach
(using the above basic example) i would create:
ArticleBO (Composite
Entity)
-
commentBO (Dependent Object1)
- commentBO
(Dependent Object2)
etc..
Is it save to say
that the ArticleBO has methods like:
-
setTitle(string)
-
setBody(string)
-
setPubDate(date)
-
addComment(commentBO)
-
removeComment(commentBO)
-
findCommentByID(string)
I guess what i'm
trying to do is combine the efforts of a "Bean" and "Facade" into one object
that my controller/container accesses. So in the event i add a comment to my
article, i invoke addComment(), pass in a collection of arguments (or object)
and it stores that information within itself.
I then pass that
ArticleBO to my DAO, which stores all the Article "information" into say
"Articles Table" and comments into "Comments" table or however i wish to
implement storage (ie could serialize the entire bean to a wddx packet or
something)
Is this a typical
approach to objects that have many dependent objects. I read that "Composite
Entity Bean" works like this (Or I may loose this in translation - probably the
case).
Regards,
--------------------------------------------------
Scott Barnes
System Development Engineer
Goro
Nickel Project
Level 8, 201 Charlotte Street
Brisbane QLD 4000
Email:
[EMAIL PROTECTED]
