I like the convenience of only needing to extend one interface, and like
that it still allows the old flexibility of only extending what you need.

John

On Wed, Dec 9, 2015 at 4:26 PM Harald Wellmann <[email protected]>
wrote:

> For the benefit of all DS Data users who prefer persist() and merge()
> over save(), I propose to extend the Data API by something like this:
>
>
> public interface FullEntityRepository<E, PK extends Serializable>
>      extends EntityRepository<E, PK>, EntityManagerDelegate<E> {
> }
>
>
> public abstract class AbstractFullEntityRepository<E, PK extends
> Serializable>
>      extends AbstractEntityRepository<E, PK>
>      implements EntityManagerDelegate<E> {
>
> }
>
> I don't really care about the exact class names (Full, Extended, you
> name it), the point is that end users can simply write
>
> public interface CustomerRepository extends
> FullEntityRepository<Customer, Long> {}
>
> to get access to all EntityManager methods.
>
> What do you think?
>
> Regards,
> Harald
>

Reply via email to