private void buildContactUsStatisticBean( List<OverviewStatisticBean> statisticBeans, Date toDate, Date fromLast7Days, Date fromLast30Days) { int total = ((Long) contactUsRepo.count()).intValue(); int last7Days = contactUsRepo.countInDateRange(fromLast7Days, toDate, ContactUs.class.getName()); int last30Days = contactUsRepo.countInDateRange(fromLast30Days, toDate, ContactUs.class.getName()); OverviewStatisticBean statisticBean = new OverviewStatisticBean( "Contact Us Request", total, last7Days, last30Days, WebConstants.FixValue.CONTACT_US_REPORT); statisticBeans.add(statisticBean); }