public interface JpaRepository<T extends Serializable, ID extends Serializable> {
public <S extends T> S save(S object);
}
@MappedSuperclass
public class JpaObject {
@Id
@GeneratedValue
private Long id;
(.... created, last updated, general stuff here....)
}
@NoRepositoryBean
public interface Dao<T extends JpaObject> extends JpaRepository<T, Long> {
}
@Repository
public interface GenericDao extends Dao<JpaObject> {
}