LoginSignup
1
1

More than 5 years have passed since last update.

JPAでページネーション

Last updated at Posted at 2013-04-30

fromfetch で絞り込みます。

public List<Account> findBySizeAndPage(int size, int page) {
    int start = page * size;
    List<Account> accounts = Account.find("order by accountId").from(start).fetch(size);
}

参考

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1