Examples of QSort


Examples of org.springframework.data.querydsl.QSort

   * @see org.springframework.data.querydsl.QueryDslPredicateExecutor#findAll(com.mysema.query.types.Predicate, com.mysema.query.types.OrderSpecifier<?>[])
   */
  public List<T> findAll(Predicate predicate, OrderSpecifier<?>... orders) {

    JPQLQuery query = createQuery(predicate);
    query = querydsl.applySorting(new QSort(orders), query);
    return query.list(path);
  }
View Full Code Here

Examples of org.springframework.data.querydsl.QSort

  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
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.