Having a look at some JPA code and I see:
public interface Dao<T extends DomainObject>
public interface EventDao extends Dao<Event> - nothing added to Dao<Event>
public abstract class AbstractDaoJPAImpl<T extends DomainObject> extends JpaDaoSupport implements Dao<T>
public class EventDaoJPAImp extends AbstractDaoJPAImpl<Event> implements EventDao
Why are these 2 interfaces needed? Why not have simply
public abstract class AbstractDao<T extends DomainObject> extends JpaDaoSupport
public class EventDao extends AbstractDaoJPAImpl<Event>
I'm coming from a Ruby on Rails world where things seem simpler. I'm positive this Java approach has many advantages. I can often recognize when an interface should be used, but sometimes I get the feeling Java devs go interface-crazy.