oop « dao « Java Database Q&A

1. Should web app domain objects containing collections have "add" and "remove" item methods?    stackoverflow.com

Let's say I have a Person class that has a collection of Dog objects. The relationship is bidirectional.

public class Person {
  private List<Dog> dogs;
  // getter and setter ...

2. Hiding DAOs behind service, why?    stackoverflow.com

Upon reviewing a bunch of MVC style web applications, I'm noticing that it's common to have a very large service interface sitting in front of the business layer. The implementation ...

3. Is this how you go about calling your Dao's in your service layer?    stackoverflow.com

In your service layer, say you have a method that does XX, is this how you would reference your Dao classes?

public class SomeServiceImpl implements SomeService

    public void DoSomething(int ...

4. Creating a Publish-Subscribe Pattern to integrate to the DAO pattern    stackoverflow.com

Based on the question (http://stackoverflow.com/questions/2068425/how-to-create-a-client-notification-service-for-a-webapp-or-should-i-use-an-obser) I will like to know. I have a fully implemented DAO with Entity beans containing only getters and setters method. Each entity is mapped to an ...