Package com.dianping.cat.home.dal.report

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


      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

      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

      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

      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

      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

      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

      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

      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

      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

Related Classes of com.dianping.cat.home.dal.report.WeeklyReportContent

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.