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

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


    try {
      MonthlyReport monthReport = m_monthlyReportDao.findReportByDomainNamePeriod(report.getPeriod(),
            report.getDomain(), report.getName(), MonthlyReportEntity.READSET_FULL);

      if (monthReport != null) {
        MonthlyReportContent reportContent = m_monthlyReportContentDao.createLocal();

        reportContent.setKeyReportId(monthReport.getId());
        reportContent.setReportId(monthReport.getId());
        m_monthlyReportDao.deleteReportByDomainNamePeriod(report);
        m_monthlyReportContentDao.deleteByPK(reportContent);
      }
    } catch (Exception e) {
      Cat.logError(e);
    }

    try {
      m_monthlyReportDao.insert(report);

      int id = report.getId();
      MonthlyReportContent proto = m_monthlyReportContentDao.createLocal();

      proto.setReportId(id);
      proto.setContent(content);
      m_monthlyReportContentDao.insert(proto);

      return true;
    } catch (DalException e) {
      Cat.logError(e);
View Full Code Here


      return new BugReport(domain);
    }
  }

  private BugReport queryFromMonthlyBinary(int id, String domain) throws DalException {
    MonthlyReportContent content = m_monthlyReportContentDao.findByPK(id, MonthlyReportContentEntity.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 queryFromMonthlyBinary(int id, String domain) throws DalException {
    MonthlyReportContent content = m_monthlyReportContentDao.findByPK(id, MonthlyReportContentEntity.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 queryFromMonthlyBinary(int id, String domain) throws DalException {
    MonthlyReportContent content = m_monthlyReportContentDao.findByPK(id, MonthlyReportContentEntity.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 queryFromMonthlyBinary(int id, String domain) throws DalException {
    MonthlyReportContent content = m_monthlyReportContentDao.findByPK(id, MonthlyReportContentEntity.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 queryFromMonthlyBinary(int id, String domain) throws DalException {
    MonthlyReportContent content = m_monthlyReportContentDao.findByPK(id, MonthlyReportContentEntity.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 queryFromMonthlyBinary(int id, String domain) throws DalException {
    MonthlyReportContent content = m_monthlyReportContentDao.findByPK(id, MonthlyReportContentEntity.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 queryFromMonthlyBinary(int id, String domain) throws DalException {
    MonthlyReportContent content = m_monthlyReportContentDao.findByPK(id, MonthlyReportContentEntity.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 queryFromMonthlyBinary(int id, String domain) throws DalException {
    MonthlyReportContent content = m_monthlyReportContentDao.findByPK(id, MonthlyReportContentEntity.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 queryFromMonthlyBinary(int id, String domain) throws DalException {
    MonthlyReportContent content = m_monthlyReportContentDao.findByPK(id, MonthlyReportContentEntity.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.MonthlyReportContent

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.