Package it.eng.spagobi.kpi.model.bo

Examples of it.eng.spagobi.kpi.model.bo.Model


 
 
  static protected Model toModelWithoutChildren(SbiKpiModel value,
      Session aSession) {
    logger.debug("IN");
    Model toReturn = new Model();

    String name = value.getKpiModelNm();
    String description = value.getKpiModelDesc();
    String code = value.getKpiModelCd();
    String label = value.getKpiModelLabel();
    Integer id = value.getKpiModelId();
    SbiKpi sbiKpi = value.getSbiKpi();
    Integer kpiId = null;
    if (sbiKpi != null) {
      kpiId = sbiKpi.getKpiId();
    }

    String typeCd = value.getModelType().getValueCd();
    Integer typeId = value.getModelType().getValueId();
    String typeName = value.getModelType().getValueNm();
    String typeDescription = value.getModelType().getValueDs();
   
    // Put
    // add also associated UDP
    List udpValues = null;
    try {
      udpValues = DAOFactory.getUdpDAOValue().findByReferenceId(id, "MODEL");
    } catch (EMFUserError e) {
      logger.error("Errror in retrieving udp values", e);
    }
    toReturn.setUdpValues(udpValues);

    toReturn.setId(id);
    toReturn.setName(name);
    toReturn.setDescription(description);
    toReturn.setCode(code);
    toReturn.setLabel(label);
    toReturn.setTypeId(typeId);   
    toReturn.setTypeCd(typeCd)
    toReturn.setTypeName(typeName);
    toReturn.setTypeDescription(typeDescription);
   
    toReturn.setChildrenNodes(null);
    toReturn.setKpiId(kpiId);

    logger.debug("OUT");
    return toReturn;
  }
View Full Code Here


      Query hibQuery = aSession.createQuery(query);
      toTransform=  hibQuery.list();

      for (Iterator iterator = toTransform.iterator(); iterator.hasNext();) {
        SbiKpiModel sbiKpiModel = (SbiKpiModel) iterator.next();
        Model aModel = toModelWithoutChildren(sbiKpiModel, aSession);
        toReturn.add(aModel);
      }

    } catch (HibernateException he) {
      logger.error("Error while loading the list of SbiKpiModel", he);
View Full Code Here

TOP

Related Classes of it.eng.spagobi.kpi.model.bo.Model

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.