Package it.eng.spagobi.tools.udp.bo

Examples of it.eng.spagobi.tools.udp.bo.Udp



  public Udp loadById(Integer id) {
    logger.debug("IN");
    Session session = getSession();
    Udp udp = null;
    Transaction tx = null;
    try {
      tx = session.beginTransaction();
      SbiUdp prop = (SbiUdp)session.get(SbiUdp.class, id);
      tx.commit();
View Full Code Here


   * @throws EMFUserError
   */

  public Udp loadByLabel(String label) throws EMFUserError {
    logger.debug("IN");
    Udp udp = null;
    Session tmpSession = null;
    Transaction tx = null;
    try {
      tmpSession = getSession();
      tx = tmpSession.beginTransaction();
View Full Code Here

   * @throws EMFUserError
   */

  public Udp loadByLabelAndFamily(String label, String family) throws EMFUserError {
    logger.debug("IN");
    Udp udp = null;
    Session tmpSession = null;
    Transaction tx = null;
    try {
      tmpSession = getSession();
      tx = tmpSession.beginTransaction();
View Full Code Here

      List<SbiUdp> list = (List<SbiUdp>)query.list();
      if(list != null){
        toReturn = new ArrayList<Udp>();
        for (Iterator iterator = list.iterator(); iterator.hasNext();) {
          SbiUdp sbiUdp = (SbiUdp) iterator.next();
          Udp udp = toUdp(sbiUdp);
          toReturn.add(udp);
        }
      }
      tx.commit();
View Full Code Here

 


  public Udp toUdp(SbiUdp sbiUdp){
    logger.debug("IN");
    Udp toReturn=new Udp();

    toReturn.setUdpId(sbiUdp.getUdpId());
    toReturn.setLabel(sbiUdp.getLabel());
    toReturn.setName(sbiUdp.getName());
    toReturn.setDescription(sbiUdp.getDescription());
    toReturn.setDataTypeId(sbiUdp.getTypeId());
    toReturn.setFamilyId(sbiUdp.getFamilyId());
    toReturn.setMultivalue(sbiUdp.isIsMultivalue());

    // get the type ValueCd
    if (sbiUdp.getTypeId() != null){
      Domain domain;
      try {
        domain = DAOFactory.getDomainDAO().loadDomainById(sbiUdp.getTypeId());
        toReturn.setDataTypeValeCd(domain.getValueCd());
      } catch (EMFUserError e) {
        logger.error("error in loading domain with Id "+sbiUdp.getTypeId(), e);
      }
    }
    logger.debug("OUT");
View Full Code Here

            //udpValue.setLabel(label);
            udpValue.setValue(value);
            udpValue.setReferenceId(kpiId);

            // get the UDP to get ID (otherwise could be taken in js page)
            Udp udp = DAOFactory.getUdpDAO().loadByLabelAndFamily(label, "KPI");
            Domain familyDomain = DAOFactory.getDomainDAO().loadDomainById(udp.getFamilyId());

            Integer idUdp = udp.getUdpId();

            udpValue.setLabel(udp.getLabel());
            udpValue.setName(udp.getName());
            udpValue.setFamily(familyDomain != null ? familyDomain.getValueCd() : null);
            udpValue.setUdpId(udp.getUdpId());

            udpValues.add(udpValue);
          }

          k.setUdpValues(udpValues);
View Full Code Here

          Domain type = (Domain)udpFamilies.get(i);
          //kpi udp/model udp
          List<Udp> udpList = DAOFactory.getUdpDAO().loadAllByFamily(type.getValueCd());
          if(udpList != null && !udpList.isEmpty()){
            for (Iterator iterator = udpList.iterator(); iterator.hasNext();) {
              Udp udp = (Udp) iterator.next();
              exporter.insertUdp(udp, session);         
            }
          }
        }
      }
View Full Code Here

          udpValue.setLabel(obj.getString("label"));
          udpValue.setValue(value);
          udpValue.setReferenceId(model.getId());

          // get the UDP to get ID (otherwise could be taken in js page)
          Udp udp = DAOFactory.getUdpDAO().loadByLabelAndFamily(labelJ, "MODEL");
          Domain familyDomain = DAOFactory.getDomainDAO().loadDomainById(udp.getFamilyId());
          logger.debug("Udp value assigning value "+value+" to UDP with label "+udp.getLabel()+ " and Model Instance with label "+ model.getLabel());
          udpValue.setLabel(udp.getLabel());
          udpValue.setName(udp.getName());
          udpValue.setFamily(familyDomain != null ? familyDomain.getValueCd() : null);
          udpValue.setUdpId(udp.getUdpId());

          udpValues.add(udpValue);
        }
        model.setUdpValues(udpValues);
       
View Full Code Here

TOP

Related Classes of it.eng.spagobi.tools.udp.bo.Udp

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.