Examples of Sort

@author Robert "kebernet" Cooper
  • org.slim3.datastore.Sort
    The collection of constants of class. @author taedium @since 1.0.0
  • org.springframework.data.domain.Sort
    Sort option for queries. You have to provide at least a list of properties to sort for that must not include {@literal null} or empty strings. The direction defaults to {@link Sort#DEFAULT_DIRECTION}. @author Oliver Gierke @author Thomas Darimont
  • org.synyx.hades.domain.Sort
  • prefuse.data.util.Sort
    rg">jeffrey heer
  • wycs.solver.smt.Sort
    A sort is the term for a type in the SMT domain. This class provides a few default sorts as well as the ability to create generic sorts, such as {@link wycs.solver.smt.Sort.Set}s or {@link wycs.solver.smt.Sort.Tuple}s. In order to utilise these generic sorts, it is required that the initialisers (from {@link #generateInitialisers(Solver)} be added to the surrounding {@link wycs.solver.smt.Block} or {@link wycs.solver.smt.Smt2File}.

    This design pattern is required as it is not possible to easily write custom theorems to add to SMT solvers. @author Henry J. Wylde


  • Examples of org.springframework.data.domain.Sort

          detectsDistinctCorrectly(prefix + "UsersByLastname", false);
          detectsDistinctCorrectly(prefix + "ByLastname", false);
          // Check it's non-greedy (would strip everything until Order*By*
          // otherwise)
          PartTree tree = detectsDistinctCorrectly(prefix + "ByLastnameOrderByFirstnameDesc", false);
          assertThat(tree.getSort(), is(new Sort(Direction.DESC, "firstname")));
        }
      }
    View Full Code Here

    Examples of org.springframework.data.domain.Sort

      public void buildsPartTreeFromEmptyPredicateCorrectly() {

        PartTree tree = new PartTree("findAllByOrderByLastnameAsc", User.class);

        assertThat(tree.getParts(), is(emptyIterable()));
        assertThat(tree.getSort(), is(new Sort(Direction.ASC, "lastname")));
      }
    View Full Code Here

    Examples of org.springframework.data.domain.Sort

      @Test
      public void buildsUpRequestParameters() throws Exception {

        assertUriStringFor(SORT, "sort=firstname,lastname,desc");
        assertUriStringFor(new Sort(ASC, "foo").and(new Sort(DESC, "bar").and(new Sort(ASC, "foobar"))),
            "sort=foo,asc&sort=bar,desc&sort=foobar,asc");
        assertUriStringFor(new Sort(ASC, "foo").and(new Sort(ASC, "bar").and(new Sort(DESC, "foobar"))),
            "sort=foo,bar,asc&sort=foobar,desc");
      }
    View Full Code Here

    Examples of org.springframework.data.domain.Sort

    public class OrderBySourceUnitTests {

      @Test
      public void handlesSingleDirectionAndPropertyCorrectly() throws Exception {

        assertThat(new OrderBySource("UsernameDesc").toSort(), is(new Sort(DESC, "username")));
      }
    View Full Code Here

    Examples of org.springframework.data.domain.Sort

       *
       * @return
       */
      public T createQuery() {

        Sort dynamicSort = parameters != null ? parameters.getSort() : null;
        return createQuery(dynamicSort);
      }
    View Full Code Here

    Examples of org.springframework.data.domain.Sort

       * @param dynamicSort
       * @return
       */
      public T createQuery(Sort dynamicSort) {

        Sort staticSort = tree.getSort();
        Sort sort = staticSort != null ? staticSort.and(dynamicSort) : dynamicSort;

        return complete(createCriteria(tree), sort);
      }
    View Full Code Here

    Examples of org.springframework.data.domain.Sort

       */
      @Test
      public void exposesPageableParameter() throws Exception {

        this.method = SampleRepo.class.getMethod("findByFirstname", String.class, Pageable.class);
        PageRequest pageable = new PageRequest(2, 3, new Sort(Direction.DESC, "lastname"));

        assertThat(evaluateExpression("#pageable.offset", new Object[] { "test", pageable }), is((Object) 6));
        assertThat(evaluateExpression("#pageable.pageSize", new Object[] { "test", pageable }), is((Object) 3));
        assertThat(evaluateExpression("#pageable.sort.toString()", new Object[] { "test", pageable }),
            is((Object) "lastname: DESC"));
    View Full Code Here

    Examples of org.springframework.data.domain.Sort

       */
      @Test
      public void exposesSortParameter() throws Exception {

        this.method = SampleRepo.class.getMethod("findByFirstname", String.class, Sort.class);
        Sort sort = new Sort(Direction.DESC, "lastname");

        assertThat(evaluateExpression("#sort.toString()", new Object[] { "test", sort }), is((Object) "lastname: DESC"));
      }
    View Full Code Here

    Examples of org.springframework.data.domain.Sort

        if (fields.length == 0) {
          return null;
        }

        Sort sort = new Sort(sortDefault.direction(), fields);
        return sortOrNull == null ? sort : sortOrNull.and(sort);
      }
    View Full Code Here

    Examples of org.springframework.data.domain.Sort

            allOrders.add(new Order(direction, property));
          }
        }

        return allOrders.isEmpty() ? null : new Sort(allOrders);
      }
    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.