Package org.springframework.data.domain

Examples of org.springframework.data.domain.Pageable


      add("result");
    }}));

    assertEquals("result", reader.doRead());

    Pageable pageRequest = pageRequestContainer.getValue();
    assertEquals(0, pageRequest.getOffset());
    assertEquals(0, pageRequest.getPageNumber());
    assertEquals(1, pageRequest.getPageSize());
    assertEquals("id: ASC", pageRequest.getSort().toString());
  }
View Full Code Here


   * @return the list of items that make up the page
   * @throws Exception
   */
  @SuppressWarnings("unchecked")
  protected List<T> doPageRead() throws Exception {
    Pageable pageRequest = new PageRequest(page, pageSize, sort);

    MethodInvoker invoker = createMethodInvoker(repository, methodName);

    List<Object> parameters = new ArrayList<Object>();

View Full Code Here

  @Override
  @SuppressWarnings("unchecked")
  protected Iterator<T> doPageRead() {

    Pageable pageRequest = new PageRequest(page, pageSize, sort);

    String populatedQuery = replacePlaceholders(query, parameterValues);

    Query mongoQuery = null;
View Full Code Here

    when(repository.findAll(pageRequestContainer.capture())).thenReturn(new PageImpl<Object>(new ArrayList<Object>()));

    assertNull(reader.doRead());

    Pageable pageRequest = pageRequestContainer.getValue();
    assertEquals(0, pageRequest.getOffset());
    assertEquals(0, pageRequest.getPageNumber());
    assertEquals(1, pageRequest.getPageSize());
    assertEquals("id: ASC", pageRequest.getSort().toString());
  }
View Full Code Here

      add(result);
    }}));

    assertEquals(result, reader.doRead());

    Pageable pageRequest = pageRequestContainer.getValue();
    assertEquals(0, pageRequest.getOffset());
    assertEquals(0, pageRequest.getPageNumber());
    assertEquals(1, pageRequest.getPageSize());
    assertEquals("id: ASC", pageRequest.getSort().toString());
  }
View Full Code Here

    }}));

    assertFalse(reader.doRead() == result);
    assertEquals(result, reader.doRead());

    Pageable pageRequest = pageRequestContainer.getValue();
    assertEquals(1, pageRequest.getOffset());
    assertEquals(1, pageRequest.getPageNumber());
    assertEquals(1, pageRequest.getPageSize());
    assertEquals("id: ASC", pageRequest.getSort().toString());
  }
View Full Code Here

    assertFalse(reader.doRead() == result);
    assertEquals(result, reader.doRead());
    assertNull(reader.doRead());

    Pageable pageRequest = pageRequestContainer.getValue();
    assertEquals(2, pageRequest.getOffset());
    assertEquals(2, pageRequest.getPageNumber());
    assertEquals(1, pageRequest.getPageSize());
    assertEquals("id: ASC", pageRequest.getSort().toString());
  }
View Full Code Here

  public @ResponseBody
  Map<String, ? extends Object> list(@RequestParam int page,
      @RequestParam int start, @RequestParam int limit,
      @RequestParam(required = false) Object filter) throws Exception {
    try {
      Pageable pageable = new PageRequest(page - 1, limit);
      Page<UserUI> users = null;

      List<FilterRequest> filters = new ArrayList<FilterRequest>();
      filters.add(new FilterRequest("accountType", ACCOUNT_TYPE));
View Full Code Here

  Map<String, ? extends Object> list(@RequestParam int page,
      @RequestParam int start, @RequestParam int limit,
      @RequestParam(required = false) Object filter,
      @RequestParam(required = false) String accountType) throws Exception {
    try {
      Pageable pageable = new PageRequest(page - 1, limit);
      Page<UserUI> users = null;

      List<FilterRequest> filters = new ArrayList<FilterRequest>();
      filters.add(new FilterRequest("accountType", accountType));
View Full Code Here

  public @ResponseBody
  Map<String, ? extends Object> list(@RequestParam int page,
      @RequestParam int start, @RequestParam int limit,
      @RequestParam(required = false) Object filter) throws Exception {
    try {
      Pageable pageable = new PageRequest(page - 1, limit);
      Page<UserUI> users = null;
      List<FilterRequest> filters = new ArrayList<FilterRequest>();
     
      if (filter != null) {
        logger.debug("Processing Filters!");
View Full Code Here

TOP

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

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.