Exemplo n.º 1
0
  @Override
  protected void importMatching(ReportTable object, ReportTable match) {
    match.setName(object.getName());
    match.setRegression(object.isRegression());

    match.setDoIndicators(match.isDoIndicators());
    match.setDoPeriods(match.isDoPeriods());
    match.setDoUnits(match.isDoUnits());

    match.getRelatives().setLastMonth(object.getRelatives().isLastMonth());
    match.getRelatives().setMonthsThisYear(object.getRelatives().isMonthsThisYear());
    match.getRelatives().setQuartersThisYear(object.getRelatives().isQuartersThisYear());
    match.getRelatives().setThisYear(object.getRelatives().isThisYear());
    match.getRelatives().setMonthsLastYear(object.getRelatives().isMonthsLastYear());
    match.getRelatives().setQuartersLastYear(object.getRelatives().isQuartersLastYear());
    match.getRelatives().setLastYear(object.getRelatives().isLastYear());

    match
        .getReportParams()
        .setParamReportingMonth(object.getReportParams().isParamReportingMonth());
    match
        .getReportParams()
        .setParamParentOrganisationUnit(object.getReportParams().isParamParentOrganisationUnit());
    match
        .getReportParams()
        .setParamOrganisationUnit(object.getReportParams().isParamOrganisationUnit());

    reportTableService.saveReportTable(match);
  }
Exemplo n.º 2
0
  @Override
  protected boolean isIdentical(ReportTable object, ReportTable existing) {
    if (!object.getName().equals(existing.getName())) {
      return false;
    }
    if (object.isRegression() != existing.isRegression()) {
      return false;
    }

    if (object.isDoIndicators() != existing.isDoIndicators()) {
      return false;
    }
    if (object.isDoPeriods() != existing.isDoPeriods()) {
      return false;
    }
    if (object.isDoUnits() != existing.isDoUnits()) {
      return false;
    }

    return true;
  }