Package com.dianping.cat.home.dal.alarm

Examples of com.dianping.cat.home.dal.alarm.ScheduledReport


    model.setUserReportSubStates(userRules);
  }

  public void scheduledReportDelete(Payload payload) {
    int id = payload.getScheduledReportId();
    ScheduledReport proto = m_scheduledReportDao.createLocal();

    proto.setKeyId(id);

    try {
      ScheduledReport report = m_scheduledReportDao.findByPK(id, ScheduledReportEntity.READSET_FULL);
      String domain = report.getDomain();
      m_scheduledReportDao.deleteByPK(proto);

      if (StringUtils.isNotEmpty(domain)) {
        m_reports.remove(domain);
      }
View Full Code Here


  public void scheduledReportUpdate(Payload payload, Model model) {
    int id = payload.getScheduledReportId();

    try {
      ScheduledReport scheduledReport = m_scheduledReportDao.findByPK(id, ScheduledReportEntity.READSET_FULL);

      model.setScheduledReport(scheduledReport);
    } catch (DalException e) {
      Cat.logError(e);
    }
View Full Code Here

  }

  public void scheduledReportUpdateSubmit(Payload payload, Model model) {
    int id = payload.getScheduledReportId();
    String content = payload.getContent();
    ScheduledReport entity = m_scheduledReportDao.createLocal();

    entity.setNames(content);
    entity.setKeyId(id);
    try {
      m_scheduledReportDao.updateByPK(entity, ScheduledReportEntity.UPDATESET_UPDATE_REPORTS);
      model.setOpState(Handler.SUCCESS);
    } catch (Exception e) {
      model.setOpState(Handler.FAIL);
View Full Code Here

        if (project != null) {
          String cmdbDomain = project.getCmdbDomain();

          if (StringUtils.isNotEmpty(cmdbDomain) && !report.getDomain().equals(cmdbDomain)
                && !m_reports.containsKey(cmdbDomain)) {
            ScheduledReport entity = m_scheduledReportDao.createLocal();

            entity.setKeyId(report.getKeyId());
            entity.setId(report.getId());
            entity.setNames(report.getNames());
            entity.setDomain(cmdbDomain);

            int succ = 0;
            try {
              succ = m_scheduledReportDao.updateByPK(entity, ScheduledReportEntity.UPDATESET_FULL);
            } catch (DalException e) {
View Full Code Here

  private void updateData(String domain) {
    try {
      m_scheduledReportDao.findByDomain(domain, ScheduledReportEntity.READSET_FULL);
    } catch (DalNotFoundException e) {
      ScheduledReport entity = m_scheduledReportDao.createLocal();
      entity.setNames("transaction;event;problem;health");
      entity.setDomain(domain);

      try {
        m_scheduledReportDao.insert(entity);

        ScheduledReport r = m_scheduledReportDao.findByDomain(domain, ScheduledReportEntity.READSET_FULL);
        m_reports.put(domain, r);
      } catch (DalNotFoundException e1) {
      } catch (Exception e2) {
        Cat.logError(e2);
      }
View Full Code Here

TOP

Related Classes of com.dianping.cat.home.dal.alarm.ScheduledReport

Copyright © 2018 www.massapicom. 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.