public Integer total(ScrollableSettings settings) throws Exception {
    TotalQuery totalQuery = DaoUtil.total(settings, ShopRoomTarriffCorporateRateView.class, em);

    return ((BigInteger) totalQuery.getQuery().getSingleResult()).intValue();
  }
  public Integer total(ScrollableSettings settings) throws Exception {
    TotalQuery totalQuery = DaoUtil.total(settings, InfoPermission.class, em);

    return ((BigInteger) totalQuery.getQuery().getSingleResult()).intValue();
  }