GenericDao<SomeSpecificEntity>
is not the same as GenericDao<AbstractEntity>
.
Instead, you should allow subclasses:
GenericDao<? extends AbstractEntity>
You will not be able to call any methods on it that accept T
as a parameter, since you don't know what T
is.
Alternatively, you could make the entire TableModel class generic, and accept a GenericDao<T>
.