Examples of SbiDomains


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

     
      Criterion aCriterion = Expression.eq("valueId",  aDataSource.getDialectId());
      Criteria criteria = aSession.createCriteria(SbiDomains.class);
      criteria.add(aCriterion);

      SbiDomains dialect = (SbiDomains) criteria.uniqueResult();

      if (dialect == null){
        logger.error("The Domain with value_id= "+aDataSource.getDialectId()+" does not exist.");
        throw new EMFUserError(EMFErrorSeverity.ERROR, 1035);
      }

      //If DataSource Label has changed all LOVS with that DS need to be changed
      SbiDataSource hibDataSource = (SbiDataSource) aSession.load(SbiDataSource.class,
          new Integer(aDataSource.getDsId()))
      if (aDataSource.getLabel() != null && hibDataSource.getLabel() != null){
      if (!aDataSource.getLabel().equals(hibDataSource.getLabel())){
        Query hibQuery = aSession.createQuery(" from SbiLov s where s.inputTypeCd = 'QUERY'");
       
        List hibList = hibQuery.list();
        if (!hibList.isEmpty()){
        Iterator it = hibList.iterator()
        while (it.hasNext()) {
          SbiLov lov = (SbiLov)it.next();
          String prov = lov.getLovProvider();
            SourceBean sb = SourceBean.fromXMLString(prov);
            SourceBean conn = (SourceBean)sb.getAttribute("CONNECTION");
            String conne = conn.getCharacters();
            if (conne.equals(hibDataSource.getLabel())){
              int cutStart = prov.indexOf("<CONNECTION>");
              cutStart = cutStart+12;
              int cutEnd = prov.indexOf("</CONNECTION>");
              String firstPart = prov.substring(0, cutStart);
              String secondPart = prov.substring(cutEnd, prov.length());
              prov = firstPart+aDataSource.getLabel()+secondPart;
              lov.setLovProvider(prov);
              aSession.update(lov);
            }
           
        }}
      }}
      hibDataSource.setLabel(aDataSource.getLabel());
      hibDataSource.setDialect(dialect);
      hibDataSource.setDialectDescr(dialect.getValueNm());
      hibDataSource.setDescr(aDataSource.getDescr());
      hibDataSource.setJndi(aDataSource.getJndi());
      hibDataSource.setUrl_connection(aDataSource.getUrlConnection());
      hibDataSource.setUser(aDataSource.getUser());
      hibDataSource.setPwd(aDataSource.getPwd());
View Full Code Here

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

     
      Criterion aCriterion = Expression.eq("valueId",  aDataSource.getDialectId());
      Criteria criteria = aSession.createCriteria(SbiDomains.class);
      criteria.add(aCriterion);

      SbiDomains dialect = (SbiDomains) criteria.uniqueResult();

      if (dialect == null){
        logger.error("The Domain with value_id="+aDataSource.getDialectId()+" does not exist.");
        throw new EMFUserError(EMFErrorSeverity.ERROR, 1035);
      }
      SbiDataSource hibDataSource = new SbiDataSource();
      hibDataSource.setDialect(dialect);
      hibDataSource.setDialectDescr(dialect.getValueNm());
      hibDataSource.setLabel(aDataSource.getLabel());
      hibDataSource.setDescr(aDataSource.getDescr());
      hibDataSource.setJndi(aDataSource.getJndi());
      hibDataSource.setUrl_connection(aDataSource.getUrlConnection());
      hibDataSource.setUser(aDataSource.getUser());
View Full Code Here

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

    SbiObjects obj = hibObj.getSbiObject();
    toReturn.setObjId(obj.getBiobjId());
    toReturn.setDocumentLabel(obj.getLabel());
    toReturn.setDocumentName(obj.getName());
    toReturn.setDocumentDescription(obj.getDescr());
    SbiDomains docType = obj.getObjectType();
    toReturn.setDocumentType(docType.getValueCd());
    toReturn.setParameters(hibObj.getParameters());
    SbiEngines engine = obj.getSbiEngines();
    toReturn.setEngineName(engine.getName());
    SbiSubObjects subObj = hibObj.getSbiSubObject();
    if (subObj != null) {
View Full Code Here

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

      Integer severityId = thresholdValue.getSeverityId();

      SbiThresholdValue sbiThresholdValue = (SbiThresholdValue) aSession
      .load(SbiThresholdValue.class, thresholdValue.getId());

      SbiDomains severity = null;
      if (severityId != null) {
        severity = (SbiDomains) aSession.load(SbiDomains.class,
            severityId);
      }
View Full Code Here

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

      colour=thresholdValue.getColourString();

      Integer thresholdId = thresholdValue.getThresholdId();
      Integer severityId = thresholdValue.getSeverityId();
     
      SbiDomains severity = null;
      if (severityId != null) {
        severity = (SbiDomains) aSession.load(SbiDomains.class,
            severityId);
      }
View Full Code Here

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

      Integer thresholdId = toCreate.getThresholdId();
      Integer severityId = toCreate.getSeverityId();

      SbiThresholdValue sbiThresholdValue = new SbiThresholdValue();

      SbiDomains severity = null;
      if (severityId != null) {
        severity = (SbiDomains) aSession.load(SbiDomains.class,
            severityId);
      }
View Full Code Here

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

    ThresholdValue toReturn = new ThresholdValue();

    Integer id = t.getIdThresholdValue();
    Integer thresholdId=t.getSbiThreshold().getThresholdId();
    String label = t.getLabel();
    SbiDomains d = t.getSeverity();
    Integer severityId = null;
    String severityCd = null;
    if(d!=null){
      severityId = d.getValueId();
      severityCd = d.getValueCd();
    }
    Integer position = t.getPosition();
    Double maxValue = t.getMaxValue();
    Double minValue = t.getMinValue();
    Boolean maxClosed = t.getMaxClosed();
View Full Code Here

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

      aSession = getSession();
      tx = aSession.beginTransaction();
      hibKpiInstance = (SbiKpiInstance) aSession.load(
          SbiKpiInstance.class, kpiInstID);
      Set kpiValues = hibKpiInstance.getSbiKpiValues();
      SbiDomains dom = hibKpiInstance.getChartType();
      String chartType = null;
      if (dom != null)
        chartType = dom.getValueCd();

      Iterator iVa = kpiValues.iterator();
      while (iVa.hasNext()) {
        SbiKpiValue value = (SbiKpiValue) iVa.next();
        Date kpiValueBegDt = value.getBeginDt();
View Full Code Here

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

        sbiThreshold = (SbiThreshold) aSession.load(SbiThreshold.class, thresholdId);
      }

      SbiKpi sbiKpi = (SbiKpi) aSession.load(SbiKpi.class, kpi.getKpiId());

      SbiDomains kpiType = null;
      if (kpi.getKpiTypeId() != null) {
        Integer kpiTypeId = kpi.getKpiTypeId();
        kpiType = (SbiDomains) aSession.load(SbiDomains.class, kpiTypeId);
      }

      SbiDomains metricScaleType = null;
      if (kpi.getMetricScaleId() != null) {
        Integer metricScaleId = kpi.getMetricScaleId();
        metricScaleType = (SbiDomains) aSession.load(SbiDomains.class, metricScaleId);
      }

      SbiDomains measureType = null;
      if (kpi.getMeasureTypeId() != null) {
        Integer measureTypeId = kpi.getMeasureTypeId();
        measureType = (SbiDomains) aSession.load(SbiDomains.class, measureTypeId);
      }
View Full Code Here

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

      tx = aSession.beginTransaction();
      SbiLov hibLov = (SbiLov) aSession.load(SbiLov.class, aModalitiesValue.getId());
      hibLov.setName(aModalitiesValue.getName());
      hibLov.setLabel(aModalitiesValue.getLabel());
      hibLov.setDescr(aModalitiesValue.getDescription());
      SbiDomains inpType = (SbiDomains) aSession.load(SbiDomains.class,
        new Integer(aModalitiesValue.getITypeId()));
      hibLov.setInputType(inpType);
      hibLov.setInputTypeCd(aModalitiesValue.getITypeCd());
      hibLov.setLovProvider(aModalitiesValue.getLovProvider());
      updateSbiCommonInfo4Update(hibLov);
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.