List of usage examples for org.springframework.data.querydsl QSort QSort
@SuppressWarnings("deprecation") public QSort(List<OrderSpecifier<?>> orderSpecifiers)
From source file:example.springdata.mongodb.customer.CustomerRepositoryIntegrationTest.java
/** * Test case to show the usage of the Querydsl-specific {@link QSort} to define the sort order in a type-safe way. *///from w w w. j a v a 2 s. c om @Test public void findCustomersUsingQuerydslSort() { QCustomer customer = QCustomer.customer; List<Customer> result = repository.findByLastname("Matthews", new QSort(customer.firstname.asc())); assertThat(result, hasSize(2)); assertThat(result.get(0), is(dave)); assertThat(result.get(1), is(oliver)); }