Examples of QPageRequest


Examples of org.springframework.data.querydsl.QPageRequest

  public void findBySpecificationWithSortByQueryDslOrderSpecifierWithQPageRequestAndQSort() {

    QUser user = QUser.user;

    Page<User> page = repository.findAll(user.firstname.isNotNull(),
        new QPageRequest(0, 10, new QSort(user.firstname.asc())));

    assertThat(page.getContent(), hasSize(3));
    assertThat(page.getContent(), hasItems(carter, dave, oliver));
    assertThat(page.getContent().get(0), is(carter));
    assertThat(page.getContent().get(1), is(dave));
View Full Code Here

Examples of org.springframework.data.querydsl.QPageRequest

  @Test
  public void findBySpecificationWithSortByQueryDslOrderSpecifierWithQPageRequest() {

    QUser user = QUser.user;

    Page<User> page = repository.findAll(user.firstname.isNotNull(), new QPageRequest(0, 10, user.firstname.asc()));

    assertThat(page.getContent(), hasSize(3));
    assertThat(page.getContent(), hasItems(carter, dave, oliver));
    assertThat(page.getContent().get(0), is(carter));
    assertThat(page.getContent().get(1), is(dave));
View Full Code Here

Examples of org.springframework.data.querydsl.QPageRequest

    dave.setManager(carter);

    QUser user = QUser.user;

    Page<User> page = repository.findAll(user.firstname.isNotNull(),
        new QPageRequest(0, 10, user.manager.firstname.asc()));

    assertThat(page.getContent(), hasSize(3));
    assertThat(page.getContent(), hasItems(carter, dave, oliver));
    assertThat(page.getContent().get(0), is(carter));
    assertThat(page.getContent().get(1), is(dave));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.