public void calculateRecordForArticleStat(DateTime aDay) {
        List<SiteModel> siteModelList = siteDao.findAllSite();
        for (SiteModel siteModel : siteModelList) {
            //for(int i=0;i<=3; i++){
            //SiteModel siteModel = siteModelList.get(i);
            ArticleStatModel uniqueVisitorModel = articleStatDao.findHighestUniqueVisitorOlderDateAndSite(
                    siteModel.getId(), aDay);
            ArticleStatModel pageViewModel = articleStatDao.findHighestPageViewOlderByDateAndSite(
                    siteModel.getId(), aDay);
            ArticleStatModel visitModel = articleStatDao.findHighestVisitOlderByDateAndSite(
                    siteModel.getId(), aDay);

            boolean isHighestArticleModelsFound = uniqueVisitorModel != null && pageViewModel != null && visitModel != null;

            if (!isHighestArticleModelsFound) {
                log.warn("There is no highest article models found for siteCode = {}, skipped", siteModel.getCode());
                continue;
            }

            RecordArticleStatDayModel recordArticleStatDay = recordArticleStatDayDao.findBySiteId(siteModel.getId());

            log.info("Found articleStatModels for siteCode = {}", siteModel.getCode());
            log.info("Found uniqueVisitorModel, uniqueVisitor = {}, articleUrl = {}, articleTitle = {}, articleId = {}",
                    uniqueVisitorModel.getUniqueVisitor(), uniqueVisitorModel.getArticleUrl(),
                    uniqueVisitorModel.getArticleTitle(), uniqueVisitorModel.getArticleId());
            log.info("Found pageViewModel, pageView = {}, articleUrl = {}, articleTitle = {}, articleId = {}",
                    pageViewModel.getPageView(), pageViewModel.getArticleUrl(), pageViewModel.getArticleTitle(),
                    pageViewModel.getArticleId());
            log.info("Found visitModel, visit = {}, articleUrl = {}, articleTitle = {}, articleId = {}",
                    visitModel.getVisit(), visitModel.getArticleUrl(), visitModel.getArticleTitle(),
                    visitModel.getArticleId());

            if (recordArticleStatDay != null) {
                if (visitModel.getVisit() > recordArticleStatDay.getVisit()) {
                    log.info("Found higher record for article stat day for 'visit'");
                    recordArticleStatDay.setVisit(visitModel.getVisit());
                    recordArticleStatDay.setVisitDate(aDay);
                    recordArticleStatDay.setVisitArticleUrl(visitModel.getArticleUrl());
                    recordArticleStatDay.setVisitArticleTitle(visitModel.getArticleTitle());
                    recordArticleStatDay.setVisitArticleId(visitModel.getArticleId());
                }
                if (pageViewModel.getPageView() > recordArticleStatDay.getPageView()) {
                    log.info("Found higher record for article stat day for 'pageView'");
                    recordArticleStatDay.setPageView(pageViewModel.getPageView());
                    recordArticleStatDay.setPageViewDate(aDay);
                    recordArticleStatDay.setPageViewArticleUrl(pageViewModel.getArticleUrl());
                    recordArticleStatDay.setPageViewArticleTitle(pageViewModel.getArticleTitle());
                    recordArticleStatDay.setPageViewArticleId(pageViewModel.getArticleId());
                }
                if (uniqueVisitorModel.getUniqueVisitor() > recordArticleStatDay.getUniqueVisitor()) {
                    log.info("Found higher record for article stat day for 'uniqueVisitor'");
                    recordArticleStatDay.setUniqueVisitor(uniqueVisitorModel.getUniqueVisitor());
                    recordArticleStatDay.setUniqueVisitorDate(aDay);
                    recordArticleStatDay.setUniqueVisitorArticleUrl(uniqueVisitorModel.getArticleUrl());
                    recordArticleStatDay.setUniqueVisitorArticleTitle(uniqueVisitorModel.getArticleTitle());
                    recordArticleStatDay.setUniqueVisitorArticleId(uniqueVisitorModel.getArticleId());
                }

                log.info("Save recordArticleStatDay for siteCode = {}", siteModel.getCode());
                recordArticleStatDayDao.save(recordArticleStatDay);
            } else {
                log.info("No existing record found, will insert one");

                RecordArticleStatDayModel newRecordArticleStat = new RecordArticleStatDayModel();
                newRecordArticleStat.setUniqueVisitor(uniqueVisitorModel.getUniqueVisitor());
                newRecordArticleStat.setUniqueVisitorDate(uniqueVisitorModel.getDate());
                newRecordArticleStat.setUniqueVisitorArticleUrl(uniqueVisitorModel.getArticleUrl());
                newRecordArticleStat.setUniqueVisitorArticleTitle(uniqueVisitorModel.getArticleTitle());
                newRecordArticleStat.setUniqueVisitorArticleId(uniqueVisitorModel.getArticleId());
                newRecordArticleStat.setVisit(visitModel.getVisit());
                newRecordArticleStat.setVisitDate(visitModel.getDate());
                newRecordArticleStat.setVisitArticleUrl(visitModel.getArticleUrl());
                newRecordArticleStat.setVisitArticleTitle(visitModel.getArticleTitle());
                newRecordArticleStat.setVisitArticleId(visitModel.getArticleId());
                newRecordArticleStat.setPageView(pageViewModel.getPageView());
                newRecordArticleStat.setPageViewDate(pageViewModel.getDate());
                newRecordArticleStat.setPageViewArticleUrl(pageViewModel.getArticleUrl());
                newRecordArticleStat.setPageViewArticleTitle(pageViewModel.getArticleTitle());
                newRecordArticleStat.setPageViewArticleId(pageViewModel.getArticleId());
                newRecordArticleStat.setSite(siteModel);
                recordArticleStatDayDao.save(newRecordArticleStat);
            }
        }
    }