Test to sort by lastName and by firstName with RooIntegrationTest.
This commit is contained in:
parent
8d56f16a27
commit
abfb750c92
src/main/java/se/su/dsv/scipro/springdata
@ -1,14 +1,20 @@
|
||||
package se.su.dsv.scipro.springdata.serviceimpls;
|
||||
|
||||
import com.mysema.query.types.path.DateTimePath;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import se.su.dsv.scipro.data.dataobjects.Employee;
|
||||
import se.su.dsv.scipro.data.dataobjects.QEmployee;
|
||||
import se.su.dsv.scipro.springdata.repos.SupervisorRepo;
|
||||
import se.su.dsv.scipro.springdata.services.SupervisorService;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@ -27,8 +33,8 @@ public class SupervisorServiceImpl extends AbstractQueryService<Employee, Long>
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Employee> findAllEmployees() {
|
||||
return supervisorRepo.findAll();
|
||||
public List<Employee> findAllEmployees(org.springframework.data.domain.Sort orders) {
|
||||
return supervisorRepo.findAll(orders);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -8,5 +8,5 @@ import java.util.List;
|
||||
* date: 2012 03 26
|
||||
*/
|
||||
public interface SupervisorService extends CrudService<Employee,Long>, QueryService<Employee, Long> {
|
||||
public List<Employee> findAllEmployees();
|
||||
public List<Employee> findAllEmployees(org.springframework.data.domain.Sort orders);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user