Exemple #1
0
 public static int getTotalPrivateSearchPageCount(String searchTerm, String user, int pageSize) {
   PagingList<Scenario> pagingList =
       find.where()
           .eq("members.email", user)
           .icontains("name", searchTerm)
           .findPagingList(pageSize);
   return pagingList.getTotalPageCount();
 }
Exemple #2
0
 public static int getTotalPublicAcceptedNotExpiredPageCount(int pageSize, Date currentDate) {
   PagingList<Scenario> pagingList =
       find.where()
           .eq("isPublic", true)
           .eq("isAccepted", true)
           .or(
               com.avaje.ebean.Expr.lt("expirationDate", currentDate),
               com.avaje.ebean.Expr.isNull("expirationDate"))
           .findPagingList(pageSize);
   return pagingList.getTotalPageCount();
 }
Exemple #3
0
 public static int getTotalPrivatePageCount(String user, int pageSize) {
   PagingList<Scenario> pagingList =
       find.where().eq("members.email", user).findPagingList(pageSize);
   return pagingList.getTotalPageCount();
 }