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?
Thanks for any response.