Examples of WeeklyReportContent


Examples of com.dianping.cat.home.dal.report.WeeklyReportContent

    try {
      WeeklyReport weeklyReport = m_weeklyReportDao.findReportByDomainNamePeriod(report.getPeriod(),
            report.getDomain(), report.getName(), WeeklyReportEntity.READSET_FULL);

      if (weeklyReport != null) {
        WeeklyReportContent reportContent = m_weeklyReportContentDao.createLocal();

        reportContent.setKeyReportId(weeklyReport.getId());
        reportContent.setReportId(weeklyReport.getId());
        m_weeklyReportContentDao.deleteByPK(reportContent);
        m_weeklyReportDao.deleteReportByDomainNamePeriod(report);
      }
    } catch (Exception e) {
      Cat.logError(e);
    }

    try {
      m_weeklyReportDao.insert(report);

      int id = report.getId();
      WeeklyReportContent proto = m_weeklyReportContentDao.createLocal();

      proto.setReportId(id);
      proto.setContent(content);
      m_weeklyReportContentDao.insert(proto);
      return true;
    } catch (DalException e) {
      Cat.logError(e);
      return false;
View Full Code Here

Examples of com.dianping.cat.home.dal.report.WeeklyReportContent

      return new BugReport(domain);
    }
  }

  private BugReport queryFromWeeklyBinary(int id, String domain) throws DalException {
    WeeklyReportContent content = m_weeklyReportContentDao.findByPK(id, WeeklyReportContentEntity.READSET_FULL);

    if (content != null) {
      return DefaultNativeParser.parse(content.getContent());
    } else {
      return new BugReport(domain);
    }
  }
View Full Code Here

Examples of com.dianping.cat.home.dal.report.WeeklyReportContent

      return new EventReport(domain);
    }
  }

  private EventReport queryFromWeeklyBinary(int id, String domain) throws DalException {
    WeeklyReportContent content = m_weeklyReportContentDao.findByPK(id, WeeklyReportContentEntity.READSET_FULL);

    if (content != null) {
      return DefaultNativeParser.parse(content.getContent());
    } else {
      return new EventReport(domain);
    }
  }
View Full Code Here

Examples of com.dianping.cat.home.dal.report.WeeklyReportContent

      return new UtilizationReport(domain);
    }
  }

  private UtilizationReport queryFromWeeklyBinary(int id, String domain) throws DalException {
    WeeklyReportContent content = m_weeklyReportContentDao.findByPK(id, WeeklyReportContentEntity.READSET_FULL);

    if (content != null) {
      return DefaultNativeParser.parse(content.getContent());
    } else {
      return new UtilizationReport(domain);
    }
  }
View Full Code Here

Examples of com.dianping.cat.home.dal.report.WeeklyReportContent

      return new MatrixReport(domain);
    }
  }

  private MatrixReport queryFromWeeklyBinary(int id, String domain) throws DalException {
    WeeklyReportContent content = m_weeklyReportContentDao.findByPK(id, WeeklyReportContentEntity.READSET_FULL);

    if (content != null) {
      return DefaultNativeParser.parse(content.getContent());
    } else {
      return new MatrixReport(domain);
    }
  }
View Full Code Here

Examples of com.dianping.cat.home.dal.report.WeeklyReportContent

      return new ServiceReport(domain);
    }
  }

  private ServiceReport queryFromWeeklyBinary(int id, String domain) throws DalException {
    WeeklyReportContent content = m_weeklyReportContentDao.findByPK(id, WeeklyReportContentEntity.READSET_FULL);

    if (content != null) {
      return DefaultNativeParser.parse(content.getContent());
    } else {
      return new ServiceReport(domain);
    }
  }
View Full Code Here

Examples of com.dianping.cat.home.dal.report.WeeklyReportContent

      return new StateReport(domain);
    }
  }

  private StateReport queryFromWeeklyBinary(int id, String domain) throws DalException {
    WeeklyReportContent content = m_weeklyReportContentDao.findByPK(id, WeeklyReportContentEntity.READSET_FULL);

    if (content != null) {
      return DefaultNativeParser.parse(content.getContent());
    } else {
      return new StateReport(domain);
    }
  }
View Full Code Here

Examples of com.dianping.cat.home.dal.report.WeeklyReportContent

      return new AlertReport(domain);
    }
  }

  private AlertReport queryFromWeeklyBinary(int id, String domain) throws DalException {
    WeeklyReportContent content = m_weeklyReportContentDao.findByPK(id, WeeklyReportContentEntity.READSET_FULL);

    if (content != null) {
      return DefaultNativeParser.parse(content.getContent());
    } else {
      return new AlertReport(domain);
    }
  }
View Full Code Here

Examples of com.dianping.cat.home.dal.report.WeeklyReportContent

      return new CrossReport(domain);
    }
  }

  private CrossReport queryFromWeeklyBinary(int id, String domain) throws DalException {
    WeeklyReportContent content = m_weeklyReportContentDao.findByPK(id, WeeklyReportContentEntity.READSET_FULL);

    if (content != null) {
      return DefaultNativeParser.parse(content.getContent());
    } else {
      return new CrossReport(domain);
    }
  }
View Full Code Here

Examples of com.dianping.cat.home.dal.report.WeeklyReportContent

      return new ProblemReport(domain);
    }
  }

  private ProblemReport queryFromWeeklyBinary(int id, String domain) throws DalException {
    WeeklyReportContent content = m_weeklyReportContentDao.findByPK(id, WeeklyReportContentEntity.READSET_FULL);

    if (content != null) {
      return DefaultNativeParser.parse(content.getContent());
    } else {
      return new ProblemReport(domain);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.