use of com.github.drinkjava2.jsqlbox.handler.PaginHandler in project jSqlBox by drinkjava2.
the class HandlersTest method testPaginHandler.
@Test
public void testPaginHandler() {
List<Map<String, Object>> result = ctx.nQuery(new Wrap(new EntitySqlMapListHandler(DemoUser.class), new PaginHandler(2, 5)), "select u.** from DemoUser u where u.age>?", 0);
Assert.assertTrue(result.size() == 5);
List<DemoUser> users = ctx.nQuery(new Wrap(new EntityListHandler(DemoUser.class), new PaginHandler(2, 5)), "select u.** from DemoUser u where u.age>?", 0);
Assert.assertTrue(users.size() == 5);
}
use of com.github.drinkjava2.jsqlbox.handler.PaginHandler in project jSqlBox by drinkjava2.
the class HandlersTest method testHandlers.
@Test
public void testHandlers() {
List<DemoUser> result = ctx.nQuery(new Wrap(PrintSqlHandler.class, new EntityListHandler(DemoUser.class), new PaginHandler(1, 5), PrintSqlHandler.class), "select u.** from DemoUser u where u.age>?", 0);
Assert.assertTrue(result.size() == 5);
}
Aggregations