DAOs for classes that implement a common interface?

If I have two classes X & Y and a common interface Nameable as follows

publicinterface Nameable

{

public String getName();

publicvoid setName(String name);

}

publicclass Ximplements Nameable

{

private String name;

private String someString;

}

publicclass Yimplements Nameable

{

private String name;

private Date someDate;

}

What would DAOs for these objects look like? Assuming I'm using GenericDAO<T,IDextends Serializable>

and the impl GenericHibernateDAO<T, IDextends Serializable>implements GenericDAO<T, ID>

from http://www.hibernate.org/328.html, what would the class declarations for HibernateYDao and HibernateXDao look like? Would I also want a NameableDao interface somewhere?

[1591 byte] By [jds@ku.edua] at [2007-10-3 1:31:15]
# 1
Myself I have found that trying to implement inheritence in DAOs is not a good idea.Maintaining it is a problem.Although I might be biased as well because years ago I was forced to use a OO database and maintaining that was a nightmare.
jschella at 2007-7-14 18:29:09 > top of Java-index,Other Topics,Patterns & OO Design...