posted 17 years ago
I tried to use composition instead of inheritance to write a DAO because I don't want to use some methods, but when I instanciate the HibernateGenericDAO it throws a ClassCastException. When the constructor populates the persistence class, the class must have parameterized super class, and HibernateGenericDAO haven't, it just implements one.
It's better change who it populates the persistence class or throws UnsupportedOperationException in the methods that I don't want?
[originally posted on jforum.net by Guilherme Moreira]