Package br.com.objectos.comuns.relational.search

Examples of br.com.objectos.comuns.relational.search.Page


    this.wrapper = wrapper;
  }

  @Override
  public Pager load(ResultSet rs) throws SQLException {
    Page page = wrapper.getPage();

    int number = page.getNumber();
    int length = page.getLength();
    int total = rs.getInt(1);

    return new PagerJson(number, length, total);
  }
View Full Code Here


  public void page_with_offset_zero() {
    int offset = 0;
    int pageLength = 10;

    Page page = new SimplePage.Builder() //
        .startAt(offset).withLengthOf(pageLength) //
        .get();

    List<Many> result = sql.listPage(page);
    assertThat(result.size(), equalTo(pageLength));
View Full Code Here

  public void page_with_offset_gt_zero() {
    int offset = 10;
    int pageLength = 3;

    Page page = new SimplePage.Builder() //
        .startAt(offset).withLengthOf(pageLength) //
        .get();

    List<Many> result = sql.listPage(page);
    assertThat(result.size(), equalTo(pageLength));
View Full Code Here

  public void page_with_offset_zero() {
    int offset = 0;
    int pageLength = 10;

    Page page = new SimplePage.Builder() //
        .startAt(offset).withLengthOf(pageLength) //
        .get();

    List<Many> result = sql.listPage(page);
    assertThat(result.size(), equalTo(pageLength));
View Full Code Here

  public void page_with_offset_gt_zero() {
    int offset = 10;
    int pageLength = 3;

    Page page = new SimplePage.Builder() //
        .startAt(offset).withLengthOf(pageLength) //
        .get();

    List<Many> result = sql.listPage(page);
    assertThat(result.size(), equalTo(pageLength));
View Full Code Here

TOP

Related Classes of br.com.objectos.comuns.relational.search.Page

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.