Package it.eng.spagobi.commons.metadata

Examples of it.eng.spagobi.commons.metadata.SbiDomains


      hibRes.setColumnName(res.getColumn_name());
      hibRes.setTableName(res.getTable_name());

      //sbi Domains
      if(res.getType()!=null){
        SbiDomains type=(SbiDomains)session.load(SbiDomains.class, res.getTypeId());     
        hibRes.setType(type);
      }

      Transaction tx = session.beginTransaction();     
      session.save(hibRes);
View Full Code Here


      Map uniqueMap = (Map) unique;
      String valuecd = (String) uniqueMap.get("valuecd");
      String domaincd = (String) uniqueMap.get("domaincd");
      hql = "from SbiDomains dom where dom.valueCd='" + valuecd + "' and dom.domainCd='" + domaincd + "'";
      hqlQuery = sessionCurrDB.createQuery(hql);
      SbiDomains hibDom = (SbiDomains) hqlQuery.uniqueResult();
      return hibDom;
    } else if (hibObj instanceof SbiObjFunc) {
      Map uniqueMap = (Map) unique;
      Integer objid = (Integer) uniqueMap.get("objectid");
      Integer functionid = (Integer) uniqueMap.get("functionid");
View Full Code Here

    String hql = null;
    Query hqlQuery = null;
    if (hibObj instanceof SbiDomains) {
      hql = "from SbiDomains where valueCd = '" + valueCd + "'"+"AND domainCd = '"+domainCd+"'";
      hqlQuery = sessionCurrDB.createQuery(hql);
      SbiDomains hibDs = (SbiDomains) hqlQuery.uniqueResult();
      return hibDs;
    }  
    logger.debug("OUT");
    return null;
  }
View Full Code Here

      }

      // SbiDomains modality

      if(alarm.getModalityId()!=null){
        SbiDomains modality=(SbiDomains)session.load(SbiDomains.class, alarm.getModalityId());     
        hibAlarm.setModality(modality);
      }

      // insert all the contacts
      Set<SbiAlarmContact> listSbiContacts = new HashSet<SbiAlarmContact>();
View Full Code Here

      List hibList = hibQuery.list();
      if(!hibList.isEmpty()) {
        return;
      }

      SbiDomains udpType=(SbiDomains)session.load(SbiDomains.class, udp.getDataTypeId());

      // main attributes     
      SbiUdp hibUdp = new SbiUdp();
      hibUdp.setDescription(udp.getDescription());
      hibUdp.setFamilyId(udp.getFamilyId());
      hibUdp.setIsMultivalue(udp.getMultivalue());
      hibUdp.setLabel(udp.getLabel());
      hibUdp.setName(udp.getName());

      hibUdp.setTypeId(udpType.getValueId());
      hibUdp.setUdpId(udp.getUdpId());

      Transaction tx = session.beginTransaction();
      session.save(hibUdp);
      tx.commit();
View Full Code Here

      throw new Exception("No predefined domains found!!!");
    }
    Iterator it = domainsList.iterator();
    while (it.hasNext()) {
      SourceBean aDomainSB = (SourceBean) it.next();
      SbiDomains aDomain = new SbiDomains();
      aDomain.setDomainCd((String) aDomainSB.getAttribute("domainCd"));
      aDomain.setDomainNm((String) aDomainSB.getAttribute("domainNm"));
      aDomain.setValueCd((String) aDomainSB.getAttribute("valueCd"));
      aDomain.setValueNm((String) aDomainSB.getAttribute("valueNm"));
      aDomain.setValueDs((String) aDomainSB.getAttribute("valueDs"));
      logger.debug("Inserting Domain with valueCd = [" + aDomainSB.getAttribute("valueCd") + "], domainCd = [" + aDomainSB.getAttribute("domainCd") + "] ...");
      aSession.save(aDomain);
    }
    logger.debug("OUT");
  }
View Full Code Here

      String valueCdXml = (String) aDomainSB.getAttribute("valueCd");
      logger.debug("Retrieved valueCd of XML Domain: "+valueCdXml);
     
      Iterator it = dbDomains.iterator();
      while (it.hasNext()) {
        SbiDomains d = (SbiDomains)it.next();
        String valueCd = d.getValueCd();
        logger.debug("Retrieved valueCd of DB Domain: "+valueCd);
       
        if(valueCdXml.equalsIgnoreCase(valueCd)){
          existsInDb = true;
          logger.debug("Domain already exists in the DB");
          break;
        }       
      } 
      if(!existsInDb){
        logger.debug("Domain doesn't exist in the DB");
        SbiDomains aDomain = new SbiDomains();
        aDomain.setDomainCd((String) aDomainSB.getAttribute("domainCd"));
        aDomain.setDomainNm((String) aDomainSB.getAttribute("domainNm"));
        aDomain.setValueCd((String) aDomainSB.getAttribute("valueCd"));
        aDomain.setValueNm((String) aDomainSB.getAttribute("valueNm"));
        aDomain.setValueDs((String) aDomainSB.getAttribute("valueDs"));
        logger.debug("New Domain ready to be iserted in the DB");
        logger.debug("Inserting Domain with valueCd = [" + aDomainSB.getAttribute("valueCd") + "], domainCd = [" + aDomainSB.getAttribute("domainCd") + "] ...");
        aSession.save(aDomain);
        logger.debug("New Domain iserted in the DB");
      }
View Full Code Here

      st = new StringTokenizer (info, ",", false);
      String input_type_cd = st.nextToken();
      String input_type_id = st.nextToken();
     
      Integer typeId = Integer.valueOf(input_type_id);
      SbiDomains parameterType = (SbiDomains)aSession.load(SbiDomains.class, typeId);
     
      SbiParameters hibParameters = (SbiParameters)aSession.load(SbiParameters.class,  aParameter.getId());
      updateSbiCommonInfo4Update(hibParameters);
      hibParameters.setDescr(aParameter.getDescription());
      hibParameters.setLength(new Short(aParameter.getLength().shortValue()));
View Full Code Here

      st = new StringTokenizer(info, ",", false);
      String input_type_cd = st.nextToken();
      String input_type_id = st.nextToken();

      Integer typeId = Integer.valueOf(input_type_id);
      SbiDomains parameterType = (SbiDomains) aSession.load(
          SbiDomains.class, typeId);

      SbiParameters hibParameters = new SbiParameters();
      hibParameters.setDescr(aParameter.getDescription());
      hibParameters.setLength(new Short(aParameter.getLength()
View Full Code Here

      hibBIObject.setName(biObject.getName());
      hibBIObject.setEncrypt(new Short(biObject.getEncrypt().shortValue()));
      hibBIObject.setVisible(new Short(biObject.getVisible().shortValue()));
      hibBIObject.setProfiledVisibility(biObject.getProfiledVisibility());
      hibBIObject.setRelName(biObject.getRelName());
      SbiDomains hibState = (SbiDomains) aSession.load(SbiDomains.class, biObject.getStateID());
      hibBIObject.setState(hibState);
      hibBIObject.setStateCode(biObject.getStateCode());
      SbiDomains hibObjectType = (SbiDomains) aSession.load(SbiDomains.class, biObject.getBiObjectTypeID());
      hibBIObject.setObjectType(hibObjectType);
      hibBIObject.setObjectTypeCode(biObject.getBiObjectTypeCode());

      hibBIObject.setRefreshSeconds(biObject.getRefreshSeconds());
View Full Code Here

TOP

Related Classes of it.eng.spagobi.commons.metadata.SbiDomains

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.