Examples of SbiGeoFeatures


Examples of it.eng.spagobi.mapcatalogue.metadata.SbiGeoFeatures

    this.biMaps = biMaps;
  }
  */
 
  public SbiGeoFeatures toSpagoBiGeoFeatures() {
    SbiGeoFeatures sbgf = new SbiGeoFeatures();
    sbgf.setFeatureId(getFeatureId());
    sbgf.setName(getName());
    sbgf.setDescr(getDescr());
    sbgf.setType(getType());
    return sbgf;
  }
View Full Code Here

Examples of it.eng.spagobi.mapcatalogue.metadata.SbiGeoFeatures

      ISbiGeoFeaturesDAO featuresDAO = DAOFactory.getSbiGeoFeaturesDAO();
      List allFeatures = featuresDAO.loadAllFeatures();
      Iterator featureIt = allFeatures.iterator();
      while (featureIt.hasNext()) {
        GeoFeature feature = (GeoFeature) featureIt.next();
        SbiGeoFeatures hibFeature = new SbiGeoFeatures(feature.getFeatureId());
        hibFeature.setDescr(feature.getDescr());
        hibFeature.setName(feature.getName());
        hibFeature.setType(feature.getType());
        session.save(hibFeature);
      }
      tx.commit();
    } catch (Exception e) {
      logger.error("Error while inserting features into export database " , e);
View Full Code Here

Examples of it.eng.spagobi.mapcatalogue.metadata.SbiGeoFeatures

      return hibMap;
    } else if (hibObj instanceof SbiGeoFeatures) {
      String name = (String) unique;
      hql = "from SbiGeoFeatures where name = '" + name + "'";
      hqlQuery = sessionCurrDB.createQuery(hql);
      SbiGeoFeatures hibMap = (SbiGeoFeatures) hqlQuery.uniqueResult();
      return hibMap;
    } else if (hibObj instanceof SbiGeoMapFeatures) {
      Map uniqueMap = (Map) unique;
      Integer mapId = (Integer) uniqueMap.get("mapId");
      Integer featureId = (Integer) uniqueMap.get("featureId");
View Full Code Here

Examples of it.eng.spagobi.mapcatalogue.metadata.SbiGeoFeatures

      // import features
      List exportedFeatures = importer.getAllExportedSbiObjects(sessionExpDB, "SbiGeoFeatures", null);
      Iterator iterFeatures = exportedFeatures.iterator();
      while (iterFeatures.hasNext()) {
        SbiGeoFeatures expFeature = (SbiGeoFeatures) iterFeatures.next();
        String name = expFeature.getName();
        Object existObj = importer.checkExistence(name, sessionCurrDB, new SbiGeoFeatures());
        SbiGeoFeatures newFeature = null;
        if (existObj != null) {
          if (!overwrite) {
            metaLog.log("Found an existing feature '" + name + "' with "
                + "the same name of the exported feature. It will be not overwritten.");
            continue;
          } else {
            metaLog.log("Found an existing feature '" + name + "' with "
                + "the same name of the exported feature. It will be overwritten.");
            newFeature = (SbiGeoFeatures) existObj;
          }
        } else {
          newFeature = new SbiGeoFeatures();
        }
        newFeature.setName(expFeature.getName());
        newFeature.setDescr(expFeature.getDescr());
        newFeature.setType(expFeature.getType());
        sessionCurrDB.save(newFeature);
        metaAss.insertCoupleFeatures(new Integer(expFeature.getFeatureId()), new Integer(newFeature.getFeatureId()));
      }

      // import association between maps and features
      List exportedMapFeatures = importer.getAllExportedSbiObjects(sessionExpDB, "SbiGeoMapFeatures", null);
      Iterator iterMapFeatures = exportedMapFeatures.iterator();
View Full Code Here

Examples of it.eng.spagobi.mapcatalogue.metadata.SbiGeoFeatures

    try {
      tmpSession = getSession();
      tx = tmpSession.beginTransaction();
      //toReturn = (SbiGeoFeatures)tmpSession.load(SbiGeoFeatures.class,  featureID);
      SbiGeoFeatures hibFeature = (SbiGeoFeatures)tmpSession.load(SbiGeoFeatures.class,  featureID);
      toReturn = hibFeature.toGeoFeature();
      tx.commit();
     
    } catch (HibernateException he) {
      logException(he);
View Full Code Here

Examples of it.eng.spagobi.mapcatalogue.metadata.SbiGeoFeatures

      Criteria criteria = tmpSession.createCriteria(SbiGeoFeatures.class);
      criteria.add(labelCriterrion)
      //List tmpLst = criteria.list();
      //return first feature (unique)
      //if (tmpLst != null && tmpLst.size()>0 ) biFeature = (SbiGeoFeatures)tmpLst.get(0);
      SbiGeoFeatures hibFeature = (SbiGeoFeatures) criteria.uniqueResult();
      if (hibFeature == null) return null;
      biFeature = hibFeature.toGeoFeature()
     
      tx.commit();
    } catch (HibernateException he) {
      logException(he);
      if (tx != null)
View Full Code Here

Examples of it.eng.spagobi.mapcatalogue.metadata.SbiGeoFeatures

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

      SbiGeoFeatures hibFeature = (SbiGeoFeatures) tmpSession.load(SbiGeoFeatures.class, new Integer(aFeature.getFeatureId()));
      hibFeature.setName(aFeature.getName());
      hibFeature.setDescr(aFeature.getDescr());
      hibFeature.setType(aFeature.getType())
      updateSbiCommonInfo4Update(hibFeature);
      tx.commit();
    } catch (HibernateException he) {
      logException(he);
View Full Code Here

Examples of it.eng.spagobi.mapcatalogue.metadata.SbiGeoFeatures

    Session tmpSession = null;
    Transaction tx = null;
    try {
      tmpSession = getSession();
      tx = tmpSession.beginTransaction();
      SbiGeoFeatures hibFeature = new SbiGeoFeatures();
      //hibFeature.setFeatureId(new Integer(-1));
      hibFeature.setName(aFeature.getName());
      hibFeature.setDescr(aFeature.getDescr());
      hibFeature.setType(aFeature.getType());
      updateSbiCommonInfo4Insert(hibFeature);
      tmpSession.save(hibFeature);
      tx.commit();
    } catch (HibernateException he) {
      logException(he);
View Full Code Here

Examples of it.eng.spagobi.mapcatalogue.metadata.SbiGeoFeatures

    Session tmpSession = null;
    Transaction tx = null;
    try {
      tmpSession = getSession();
      tx = tmpSession.beginTransaction();
      SbiGeoFeatures hibFeature = (SbiGeoFeatures) tmpSession.load(SbiGeoFeatures.class,
          new Integer(aFeature.getFeatureId()));

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

Examples of it.eng.spagobi.mapcatalogue.metadata.SbiGeoFeatures

      Query hibQuery = tmpSession.createQuery(" from SbiGeoFeatures");
     
      List hibList = hibQuery.list();
      Iterator it = hibList.iterator();     
      while (it.hasNext()) {     
        SbiGeoFeatures hibFeature = (SbiGeoFeatures) it.next()
        if (hibFeature != null) {
          GeoFeature bifeature = hibFeature.toGeoFeature()
          realResult.add(bifeature);
        }
      }

      tx.commit();
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.