コード例 #1
0
  @Override
  protected void aInit() throws Exception {
    SingularAttribute<UserAccount, ?> orderByAttribute = UserAccount_.id;
    if (csortField != null && csortField.equals("id")) {
      orderByAttribute = UserAccount_.id;
    } else if (csortField != null && csortField.equals("username")) {
      orderByAttribute = UserAccount_.username;
    }

    dataModel =
        userAccountService.getAllEntities(
            (page - 1) * rows, rows, orderByAttribute, getSortOrderType());
  }
コード例 #2
0
 @Override
 protected long initAllRowsCount() throws Exception {
   return userAccountService.count();
 }