Examples of SbiChecks


Examples of it.eng.spagobi.behaviouralmodel.check.metadata.SbiChecks

      List hibList = hibQuery.list();
      if(!hibList.isEmpty()) {
        return;
      }
      SbiDomains checkType = (SbiDomains)session.load(SbiDomains.class, check.getValueTypeId());
      SbiChecks hibCheck = new SbiChecks(check.getCheckId());
      hibCheck.setCheckType(checkType);
      hibCheck.setDescr(check.getDescription());
      hibCheck.setName(check.getName());
      hibCheck.setLabel(check.getLabel());
      hibCheck.setValue1(check.getFirstValue());
      hibCheck.setValue2(check.getSecondValue());
      hibCheck.setValueTypeCd(check.getValueTypeCd());
      session.save(hibCheck);
      tx.commit();
    } catch (Exception e) {
      logger.error("Error while inserting check into export database " , e);
      throw new EMFUserError(EMFErrorSeverity.ERROR, "8005", "component_impexp_messages");
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.check.metadata.SbiChecks

      if(!hibList.isEmpty()) {
        return;
      }
      // built key
      SbiParuseCkId hibParuseCkId = new SbiParuseCkId();
      SbiChecks hibChecks = (SbiChecks)session.load(SbiChecks.class, check.getCheckId());
      SbiParuse hibParuse = (SbiParuse)session.load(SbiParuse.class, parUse.getUseID());
      hibParuseCkId.setSbiChecks(hibChecks);
      hibParuseCkId.setSbiParuse(hibParuse);
      SbiParuseCk hibParuseCheck = new SbiParuseCk(hibParuseCkId);
      hibParuseCheck.setProg(new Integer(0));
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.check.metadata.SbiChecks

      return hibEng;
    } else if (hibObj instanceof SbiChecks) {
      String label = (String) unique;
      hql = "from SbiChecks ch where ch.label = '" + label + "'";
      hqlQuery = sessionCurrDB.createQuery(hql);
      SbiChecks hibCheck = (SbiChecks) hqlQuery.uniqueResult();
      return hibCheck;
    } else if (hibObj instanceof SbiParuse) {
      Map uniqueMap = (Map) unique;
      String label = (String) uniqueMap.get("label");
      Integer parid = (Integer) uniqueMap.get("idpar");
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.check.metadata.SbiChecks

      return;
    }
    Iterator it = checksList.iterator();
    while (it.hasNext()) {
      SourceBean aChecksSB = (SourceBean) it.next();
      SbiChecks aCheck = new SbiChecks();
      aCheck.setLabel((String) aChecksSB.getAttribute("label"));
      aCheck.setName((String) aChecksSB.getAttribute("name"));
      aCheck.setDescr((String) aChecksSB.getAttribute("descr"));

      String valueTypeCd = (String) aChecksSB.getAttribute("valueTypeCd");
      SbiDomains domainValueType = findDomain(aSession, valueTypeCd, "PRED_CHECK");
      aCheck.setCheckType(domainValueType);
      aCheck.setValueTypeCd(valueTypeCd);

      aCheck.setValue1((String) aChecksSB.getAttribute("value1"));
      aCheck.setValue2((String) aChecksSB.getAttribute("value2"));

      logger.debug("Inserting Check with label = [" + aChecksSB.getAttribute("label") + "] ...");

      aSession.save(aCheck);
    }
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.check.metadata.SbiChecks

      // Recreate Relations with sbi_paruse_ck
      List newChecks = aParameterUse.getAssociatedChecks();
      SbiParuseCk hibParUseCk = null;
      SbiParuseCkId hibParUseCkId = null;

      SbiChecks tmpCheck = null;
      Set parUseCkToSave = new HashSet();
      for (int i = 0; i < newChecks.size(); i++) {
        hibParUseCkId = new SbiParuseCkId();
        hibParUseCkId.setSbiParuse(hibParuse);
        tmpCheck = (SbiChecks) aSession.load(SbiChecks.class,
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.check.metadata.SbiChecks

      //       Recreate Relations with sbi_paruse_ck
      List newChecks = aParameterUse.getAssociatedChecks();
      SbiParuseCk hibParUseCk = null;
      SbiParuseCkId hibParUseCkId = null;

      SbiChecks tmpCheck = null;
      Set parUseCkToSave = new HashSet();
      for (int i=0; i < newChecks.size(); i++){
        hibParUseCkId = new SbiParuseCkId();
        hibParUseCkId.setSbiParuse(hibParuse);
        tmpCheck = (SbiChecks)aSession.load(SbiChecks.class, ((Check)newChecks.get(i)).getCheckId());
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.check.metadata.SbiChecks

   
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
   
      SbiChecks hibCheck = (SbiChecks)aSession.load(SbiChecks.class,  id);
     
      toReturn = toCheck(hibCheck);
      tx.commit();
     
    } catch (HibernateException he) {
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.check.metadata.SbiChecks

    Transaction tx = null;
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
     
      SbiChecks hibCheck = (SbiChecks) aSession.load(SbiChecks.class,
          check.getCheckId());

      aSession.delete(hibCheck);
      tx.commit();
    } catch (HibernateException he) {
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.check.metadata.SbiChecks

    Session aSession = null;
    Transaction tx = null;
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
      SbiChecks hibCheck = new SbiChecks();

      Criterion aCriterion = Expression.and(Expression.eq("valueId",
          check.getValueTypeId()), Expression.eq("valueCd", check
          .getValueTypeCd()));
      Criteria criteria = aSession.createCriteria(SbiDomains.class);
      criteria.add(aCriterion);

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

      if (checkType == null){
        SpagoBITracer.major(SpagoBIConstants.NAME_MODULE,
              "CheckDAOHibImpl",
              "insertCheck",
              "The Domain with value_id="+check.getValueTypeId()+" and value_cd="+check
            .getValueTypeCd()+" does not exist.");
        throw new EMFUserError(EMFErrorSeverity.ERROR, 1035);
      }
     
      hibCheck.setCheckType(checkType);
      hibCheck.setDescr(check.getDescription());
      hibCheck.setName(check.getName());
      hibCheck.setLabel(check.getLabel());
      hibCheck.setValue1(check.getFirstValue());
      hibCheck.setValue2(check.getSecondValue());
      hibCheck.setValueTypeCd(check.getValueTypeCd());
      updateSbiCommonInfo4Insert(hibCheck);
      aSession.save(hibCheck);
      tx.commit();
    } catch (HibernateException he) {
      logException(he);
View Full Code Here

Examples of it.eng.spagobi.behaviouralmodel.check.metadata.SbiChecks

    try {
     
      aSession = getSession();
      tx = aSession.beginTransaction();

      SbiChecks hibCheck = (SbiChecks) aSession.load(SbiChecks.class,
          check.getCheckId());
     
      Criterion aCriterion = Expression.and(Expression.eq("valueId",
          check.getValueTypeId()), Expression.eq("valueCd", check
          .getValueTypeCd()));
      Criteria criteria = aSession.createCriteria(SbiDomains.class);
      criteria.add(aCriterion);

      SbiDomains aSbiDomains = (SbiDomains) criteria.uniqueResult();
     
      if (aSbiDomains == null){
        SpagoBITracer.major(SpagoBIConstants.NAME_MODULE,
              "CheckDAOHibImpl",
              "modifyCheck",
              "The Domain with value_id="+check.getValueTypeId()+" and value_cd="+check
            .getValueTypeCd()+" does not exist.");
        throw new EMFUserError(EMFErrorSeverity.ERROR, 1036);
      }

      hibCheck.setDescr(check.getDescription());
      hibCheck.setName(check.getName());
      hibCheck.setLabel(check.getLabel());
      hibCheck.setValue1(check.getFirstValue());
      hibCheck.setValue2(check.getSecondValue());
      hibCheck.setCheckType(aSbiDomains);
      hibCheck.setValueTypeCd(aSbiDomains.getValueCd());
      updateSbiCommonInfo4Update(hibCheck);
      tx.commit();
     
    } catch (HibernateException he) {
      logException(he);
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.