Announcement Announcement Module
Collapse
No announcement yet.
Business objects dependends of other persistent BOs Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Business objects dependends of other persistent BOs

    Hi.

    Iīm with troubles here defining the were to put some business logic.
    I have an Scheduler business object, and it have a collection of some events (ScheduledEvent). However, to optimize some of itīs operation, it is not necessary to fetch all ScheduledEvents from persistent storage (I'm currently using Hibernate).

    I just readed this thread http://forum.springframework.org/showthread.php?t=9818 about the roles and responsabilities of the layers. However, in my case I just couldnīt think of an good solution. I can think of two possible implementations:

    1) Create a class SchedulerManager, which is responsible to, say, fetch the events in a specified range (itīs not a simple query, since an event could be repeated), and it uses the SchedulerDAO as a support class; or

    2) Since I find that the operation "list the events in this schedule in this time range" is an operation of the Scheduler class, it will end have an dependency to the data access objects. In this case, how do I pass this reference?

    Any comments?
    Thanks for any response.
    Last edited by robyn; May 14th, 2006, 10:54 AM.
Working...
X