Examples of goToPage()


Examples of com.ibatis.common.util.PaginatedList.gotoPage()

    assertEquals(2, list.size());
    assertEquals(1, ((Account) list.get(0)).getId());
    assertEquals(2, ((Account) list.get(1)).getId());

    // Test goto (page 0)
    list.gotoPage(0);
    assertFalse(list.isPreviousPageAvailable());
    assertTrue(list.isNextPageAvailable());
    assertEquals(2, list.size());
    assertEquals(1, ((Account) list.get(0)).getId());
    assertEquals(2, ((Account) list.get(1)).getId());
View Full Code Here

Examples of com.ibatis.common.util.PaginatedList.gotoPage()

    assertEquals(2, list.size());
    assertEquals(1, ((Account) list.get(0)).getId());
    assertEquals(2, ((Account) list.get(1)).getId());

    // Test goto (page 1)
    list.gotoPage(1);
    assertTrue(list.isPreviousPageAvailable());
    assertTrue(list.isNextPageAvailable());
    assertEquals(2, list.size());
    assertEquals(3, ((Account) list.get(0)).getId());
    assertEquals(4, ((Account) list.get(1)).getId());
View Full Code Here

Examples of com.ibatis.common.util.PaginatedList.gotoPage()

    assertEquals(2, list.size());
    assertEquals(3, ((Account) list.get(0)).getId());
    assertEquals(4, ((Account) list.get(1)).getId());

    // Test goto (page 2)
    list.gotoPage(2);
    assertTrue(list.isPreviousPageAvailable());
    assertFalse(list.isNextPageAvailable());
    assertEquals(1, list.size());
    assertEquals(5, ((Account) list.get(0)).getId());
View Full Code Here

Examples of com.ibatis.common.util.PaginatedList.gotoPage()

    assertFalse(list.isNextPageAvailable());
    assertEquals(1, list.size());
    assertEquals(5, ((Account) list.get(0)).getId());

    // Test illegal goto (page 0)
    list.gotoPage(3);
    assertTrue(list.isPreviousPageAvailable());
    assertFalse(list.isNextPageAvailable());
    assertEquals(0, list.size());

    list = sqlMap.queryForPaginatedList("getNoAccountsViaResultMap", 2);
View Full Code Here

Examples of com.ibatis.common.util.PaginatedList.gotoPage()

    assertFalse(list.isPreviousPageAvailable());
    assertFalse(list.isNextPageAvailable());
    assertEquals(0, list.size());

    // Test previous
    list.gotoPage(0);
    assertFalse(list.isPreviousPageAvailable());
    assertFalse(list.isNextPageAvailable());
    assertEquals(0, list.size());

    list = sqlMap.queryForPaginatedList("getFewAccountsViaResultMap", 2);
View Full Code Here

Examples of com.ibatis.common.util.PaginatedList.gotoPage()

    assertFalse(list.isPreviousPageAvailable());
    assertFalse(list.isNextPageAvailable());
    assertEquals(1, list.size());

    // Test previous
    list.gotoPage(0);
    assertFalse(list.isPreviousPageAvailable());
    assertFalse(list.isNextPageAvailable());
    assertEquals(1, list.size());

    // Test Even - Two Pages
View Full Code Here

Examples of com.ibatis.common.util.PaginatedList.gotoPage()

    assertEquals(2, list.size());
    assertEquals(1, ((Account) list.get(0)).getId());
    assertEquals(2, ((Account) list.get(1)).getId());

    // Test goto (page 0)
    list.gotoPage(0);
    assertFalse(list.isPreviousPageAvailable());
    assertTrue(list.isNextPageAvailable());
    assertEquals(2, list.size());
    assertEquals(1, ((Account) list.get(0)).getId());
    assertEquals(2, ((Account) list.get(1)).getId());
View Full Code Here

Examples of com.ibatis.common.util.PaginatedList.gotoPage()

    assertEquals(2, list.size());
    assertEquals(1, ((Account) list.get(0)).getId());
    assertEquals(2, ((Account) list.get(1)).getId());

    // Test goto (page 1)
    list.gotoPage(1);
    assertTrue(list.isPreviousPageAvailable());
    assertTrue(list.isNextPageAvailable());
    assertEquals(2, list.size());
    assertEquals(3, ((Account) list.get(0)).getId());
    assertEquals(4, ((Account) list.get(1)).getId());
View Full Code Here

Examples of com.ibatis.common.util.PaginatedList.gotoPage()

    assertEquals(2, list.size());
    assertEquals(3, ((Account) list.get(0)).getId());
    assertEquals(4, ((Account) list.get(1)).getId());

    // Test goto (page 2)
    list.gotoPage(2);
    assertTrue(list.isPreviousPageAvailable());
    assertFalse(list.isNextPageAvailable());
    assertEquals(1, list.size());
    assertEquals(5, ((Account) list.get(0)).getId());
View Full Code Here

Examples of com.ibatis.common.util.PaginatedList.gotoPage()

    assertFalse(list.isNextPageAvailable());
    assertEquals(1, list.size());
    assertEquals(5, ((Account) list.get(0)).getId());

    // Test illegal goto (page 0)
    list.gotoPage(3);
    assertTrue(list.isPreviousPageAvailable());
    assertFalse(list.isNextPageAvailable());
    assertEquals(0, list.size());

    list = sqlMap.queryForPaginatedList("getNoAccountsViaResultMap", null, 2);
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.