Package org.springframework.data.domain

Examples of org.springframework.data.domain.AbstractPageRequest


  public void createsPagedResourcesForOneIndexedArgumentResolver() {

    resolver.setOneIndexedParameters(true);
    PagedResourcesAssembler<Person> assembler = new PagedResourcesAssembler<Person>(resolver, null);

    AbstractPageRequest request = new PageRequest(0, 1);
    Page<Person> page = new PageImpl<Person>(Collections.<Person> emptyList(), request, 0);

    assembler.toResource(page);
  }
View Full Code Here


    assertThat(result.getVariableNames(), hasItems("projection", "size", "sort"));
  }

  private static Page<Person> createPage(int index) {

    AbstractPageRequest request = new PageRequest(index, 1);

    Person person = new Person();
    person.name = "Dave";

    return new PageImpl<Person>(Arrays.asList(person), request, 3);
View Full Code Here

TOP

Related Classes of org.springframework.data.domain.AbstractPageRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.