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?

