Examples of SbiEngines


Examples of it.eng.spagobi.engines.config.metadata.SbiEngines

    Transaction tx = null;

    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
      SbiEngines hibEngine = (SbiEngines)aSession.load(SbiEngines.class,  engineID);
      toReturn = toEngine(hibEngine);
      tx.commit();

    } catch (HibernateException he) {
      logException(he);
View Full Code Here

Examples of it.eng.spagobi.engines.config.metadata.SbiEngines

      tx = aSession.beginTransaction();
      Criterion labelCriterrion = Expression.eq("label",
          engineLabel);
      Criteria criteria = aSession.createCriteria(SbiEngines.class);
      criteria.add(labelCriterrion);
      SbiEngines hibEngine = (SbiEngines) criteria.uniqueResult();
      if (hibEngine == null) return null;
      engine = toEngine(hibEngine);
      tx.commit();
    } catch (HibernateException he) {
      if (tx != null)
View Full Code Here

Examples of it.eng.spagobi.engines.config.metadata.SbiEngines

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

      SbiEngines hibEngine = (SbiEngines) aSession.load(SbiEngines.class,
          aEngine.getId());
      SbiDomains hibDomainBiobjType = (SbiDomains) aSession.load(SbiDomains.class,
          aEngine.getBiobjTypeId());
      SbiDomains hibDomainEngineType = (SbiDomains) aSession.load(SbiDomains.class,
          aEngine.getEngineTypeId());
      SbiDataSource hibDataSource = null;
      if (aEngine.getDataSourceId() != null) {
        hibDataSource = (SbiDataSource) aSession.load(SbiDataSource.class, aEngine.getDataSourceId());
      }
      hibEngine.setName(aEngine.getName());
      hibEngine.setLabel(aEngine.getLabel());
      hibEngine.setDescr(aEngine.getDescription());
      hibEngine.setDriverNm(aEngine.getDriverName());
      hibEngine.setEncrypt(new Short((short) aEngine.getCriptable()
          .intValue()));
      hibEngine.setMainUrl(aEngine.getUrl());
      hibEngine.setObjUplDir(aEngine.getDirUpload());
      hibEngine.setObjUseDir(aEngine.getDirUsable());
      hibEngine.setSecnUrl(aEngine.getSecondaryUrl());
      hibEngine.setEngineType(hibDomainEngineType);
      hibEngine.setClassNm(aEngine.getClassName());
      hibEngine.setBiobjType(hibDomainBiobjType);
      hibEngine.setUseDataSet(new Boolean(aEngine.getUseDataSet()));     
      hibEngine.setUseDataSource(new Boolean(aEngine.getUseDataSource()));           
      hibEngine.setDataSource(hibDataSource);
      updateSbiCommonInfo4Update(hibEngine);
      tx.commit();
    } catch (HibernateException he) {
      logException(he);
View Full Code Here

Examples of it.eng.spagobi.engines.config.metadata.SbiEngines

          aEngine.getEngineTypeId());
      SbiDataSource hibDataSource = null;
      if (aEngine.getDataSourceId() != null) {
        hibDataSource = (SbiDataSource) aSession.load(SbiDataSource.class, aEngine.getDataSourceId());
      }
      SbiEngines hibEngine = new SbiEngines();
      hibEngine.setName(aEngine.getName());
      hibEngine.setLabel(aEngine.getLabel());
      hibEngine.setDescr(aEngine.getDescription());
      hibEngine.setDriverNm(aEngine.getDriverName());
      hibEngine.setEncrypt(new Short((short) aEngine.getCriptable()
          .intValue()));
      hibEngine.setMainUrl(aEngine.getUrl());
      hibEngine.setObjUplDir(aEngine.getDirUpload());
      hibEngine.setObjUseDir(aEngine.getDirUsable());
      hibEngine.setSecnUrl(aEngine.getSecondaryUrl());
      hibEngine.setEngineType(hibDomainEngineType);
      hibEngine.setClassNm(aEngine.getClassName());
      hibEngine.setBiobjType(hibDomainBiobjType);
      hibEngine.setDataSource(hibDataSource);
      hibEngine.setUseDataSet(new Boolean(aEngine.getUseDataSet()));
      hibEngine.setUseDataSource(new Boolean(aEngine.getUseDataSource()));
      hibEngine.setDataSource(hibDataSource)
      updateSbiCommonInfo4Insert(hibEngine);
      aSession.save(hibEngine);
      tx.commit();
    } catch (HibernateException he) {
      logException(he);
View Full Code Here

Examples of it.eng.spagobi.engines.config.metadata.SbiEngines

    Session aSession = null;
    Transaction tx = null;
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
      SbiEngines hibEngine = (SbiEngines) aSession.load(SbiEngines.class,
          aEngine.getId());
      Set <SbiExporters> exporters = hibEngine.getSbiExporterses();
      if(exporters != null && exporters.size() != 0){
        //query hsql to load exporters
        String hql = " from SbiExporters s where s.sbiEngines.engineId = ?";
        Query aQuery = aSession.createQuery(hql);
        aQuery.setInteger(0, aEngine.getId().intValue());
View Full Code Here

Examples of it.eng.spagobi.engines.config.metadata.SbiEngines

   * @return The corrispondent <code>Engine</code> object
   */
  public Exporters toExporter(SbiExporters hibExps){
    Exporters exp = new Exporters();

    SbiEngines hibEngine=hibExps.getSbiEngines();
    exp.setEngineId(hibEngine.getEngineId());

    SbiDomains hibDomains=hibExps.getSbiDomains();
    exp.setDomainId(hibDomains.getValueId());

    exp.setDefaultValue(hibExps.isDefaultValue());
View Full Code Here

Examples of it.eng.spagobi.engines.config.metadata.SbiEngines

    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) {
      toReturn.setSubObjId(subObj.getSubObjId());
      toReturn.setSubObjName(subObj.getName());
    }
View Full Code Here

Examples of it.eng.spagobi.engines.config.metadata.SbiEngines

    try {
      Query hibQuery = session.createQuery(" from SbiEngines");
      List hibList = hibQuery.list();
      Iterator it = hibList.iterator();
      while (it.hasNext()) {
        SbiEngines hibEngine = (SbiEngines) it.next();
        Engine eng = new Engine();
        eng.setCriptable(new Integer(hibEngine.getEncrypt().intValue()));
        eng.setDescription(hibEngine.getDescr());
        eng.setDirUpload(hibEngine.getObjUplDir());
        eng.setDirUsable(hibEngine.getObjUseDir());
        eng.setDriverName(hibEngine.getDriverNm());
        eng.setId(hibEngine.getEngineId());
        eng.setName(hibEngine.getName());
        eng.setLabel(hibEngine.getLabel());
        eng.setSecondaryUrl(hibEngine.getSecnUrl());
        eng.setUrl(hibEngine.getMainUrl());
        eng.setLabel(hibEngine.getLabel());
        eng.setClassName(hibEngine.getClassNm());
        engines.add(eng);
      }
    } catch (HibernateException he) {
      logger.error("Error while getting exported engine ", he);
      throw new EMFUserError(EMFErrorSeverity.ERROR, "8004", "component_impexp_messages");
View Full Code Here

Examples of it.eng.spagobi.engines.config.metadata.SbiEngines

      return hibFunct;
    } else if (hibObj instanceof SbiEngines) {
      String label = (String) unique;
      hql = "from SbiEngines eng where eng.label = '" + label + "'";
      hqlQuery = sessionCurrDB.createQuery(hql);
      SbiEngines hibEng = (SbiEngines) hqlQuery.uniqueResult();
      return hibEng;
    } else if (hibObj instanceof SbiChecks) {
      String label = (String) unique;
      hql = "from SbiChecks ch where ch.label = '" + label + "'";
      hqlQuery = sessionCurrDB.createQuery(hql);
View Full Code Here

Examples of it.eng.spagobi.engines.config.metadata.SbiEngines

          // insert into user associations
          try{
            Object existingEngineObj = impManager.getExistingObject(new Integer(engineAssociateId), SbiEngines.class);
            Object exportedEngineObj = impManager.getExportedObject(new Integer(expEngineId), SbiEngines.class);
            if( (existingEngineObj!=null) && (exportedEngineObj!=null) ) {
              SbiEngines existingEngine = (SbiEngines)existingEngineObj;
              SbiEngines exportedEngine = (SbiEngines)exportedEngineObj;
              impManager.getUserAssociation().recordEngineAssociation(exportedEngine.getLabel(), existingEngine.getLabel());
            } else {
              throw new Exception("hibernate object of existing or exported engine not recovered");
            }
          } catch (Exception e) {
            logger.warn("Error while recording user engine association", e);
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.