package org.demyo.dao;

import org.demyo.model.IModel;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.NoRepositoryBean;

/**
 * Base interface for manipulation of models.
 * 
 * @param <M> The model type (an {@link IModel}).
 */
@NoRepositoryBean
public interface IModelRepo<M extends IModel> extends JpaRepository<M, Long> {
	// TODO: figure out how to return slices. We can't override JpaRepository's findAll to return a slice
	//Slice<M> findAll(Pageable pageable);
}

@@ -17,16 +17,40 @@
 o.dao;%0A%0A
+import java.util.List;%0A%0A
 import o
@@ -109,10 +109,101 @@
 ata.
-jp
+domain.Pageable;%0Aimport org.springframework.data.domain.Slice;%0Aimport org.springframework.dat
 a.re
@@ -211,19 +211,20 @@
 ository.
-Jpa
+Crud
 Reposito
@@ -338,16 +338,112 @@
  models.
+ This doesn't inherit from JpaRepository, in order to be free to%0A * define exactly what we need.
 %0A * %0A * 
@@ -565,19 +565,20 @@
 extends 
-Jpa
+Crud
 Reposito
@@ -596,113 +596,218 @@
  %7B%0A%09
-// TODO: figure out how to return slices. We can't overrid
+@Override%0A%09List%3CM%3E findAll();%0A%0A%09/**%0A%09 * Returns a %7B@link Slice%7D of entities meeting th
 e 
-J
 pa
-Repository's findAll to return a slice%0A%09//
+ging restriction provided in the %7B@code Pageable%7D object.%0A%09 * %0A%09 * @param pageable%0A%09 * @return a page of entities%0A%09 */%0A%09
 Slic

Return Slices rather than Pages.