Examples of SbiKpiInstPeriod


Examples of it.eng.spagobi.kpi.config.metadata.SbiKpiInstPeriod

    Integer idPeriodicity = null;
    Set periods = kpiInstHist.getSbiKpiInstance().getSbiKpiInstPeriods();
    if (!periods.isEmpty()) {
      Iterator s = periods.iterator();
      while (s.hasNext()) {
        SbiKpiInstPeriod p = (SbiKpiInstPeriod) s.next();
        if (p.isDefault_().booleanValue()) {
          SbiKpiPeriodicity periodicity = p.getSbiKpiPeriodicity();
          if (periodicity != null) {
            idPeriodicity = periodicity.getIdKpiPeriodicity();
          }
        }
      }
View Full Code Here

Examples of it.eng.spagobi.kpi.config.metadata.SbiKpiInstPeriod

   *
   * @throws EMFUserError
   */
  private void importKpiInstPeriod(boolean overwrite) throws EMFUserError {
    logger.debug("IN");
    SbiKpiInstPeriod exportedKpiInstPeriod = null;
    try {
      List exportedKpiInstPeriodList = importer.getAllExportedSbiObjects(sessionExpDB, "SbiKpiInstPeriod", null);
      Iterator iterSbiKpiInstPeriod = exportedKpiInstPeriodList.iterator();
      while (iterSbiKpiInstPeriod.hasNext()) {
        exportedKpiInstPeriod = (SbiKpiInstPeriod) iterSbiKpiInstPeriod.next();
        Integer oldId = exportedKpiInstPeriod.getKpiInstPeriodId();
        Integer existingKpiInstPeriodId = null;
        Map kpiInstPeriodIdAss = metaAss.getKpiInstPeriodIDAssociation();
        Set kpiInstPeriodIdAssSet = kpiInstPeriodIdAss.keySet();
        if (kpiInstPeriodIdAssSet.contains(oldId) && !overwrite) {
          metaLog.log("Exported kpiInstPeriod with id " + exportedKpiInstPeriod.getKpiInstPeriodId() + " and" +
              " referencing Periodicity with name "+exportedKpiInstPeriod.getSbiKpiPeriodicity().getName() + "" +
              " and kpiInstance with previous id "+ exportedKpiInstPeriod.getSbiKpiInstance().getIdKpiInstance()+" not inserted  because it has the same name of an existing resource");
          continue;
        } else {
          existingKpiInstPeriodId = (Integer) kpiInstPeriodIdAss.get(oldId);
        }
        if (existingKpiInstPeriodId != null) {
          logger.info("The kpiInstPeriod with id:[" + exportedKpiInstPeriod.getKpiInstPeriodId() + "] is just present. It will be updated.");
          metaLog.log("The kpiInstPeriod referencing periodicity with name = [" + exportedKpiInstPeriod.getSbiKpiPeriodicity().getName() + "] and kpi instance with prev Id [ "+exportedKpiInstPeriod.getSbiKpiInstance().getIdKpiInstance() +" ]will be updated.");
          SbiKpiInstPeriod existingKpiInstPeriod = ImportUtilities.modifyExistingSbiKpiInstPeriod(exportedKpiInstPeriod, sessionCurrDB, existingKpiInstPeriodId, metaAss,importer);
          sessionCurrDB.update(existingKpiInstPeriod);
        } else {
          SbiKpiInstPeriod newKpiInstPeriod = ImportUtilities.makeNewSbiKpiInstPeriod(exportedKpiInstPeriod, sessionCurrDB, metaAss, importer);
          sessionCurrDB.save(newKpiInstPeriod);
          metaLog.log("Inserted new kpiInstPeriod  referring to periodicity " + newKpiInstPeriod.getSbiKpiPeriodicity().getName()+" and kpi instance "+newKpiInstPeriod.getSbiKpiInstance().getIdKpiInstance());
          Integer newId = newKpiInstPeriod.getKpiInstPeriodId();
          metaAss.insertCoupleKpiInstPeriod(oldId, newId);
        }
      }
    } catch (Exception e) {
      if (exportedKpiInstPeriod != null) {
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.