Package it.eng.spagobi.mapcatalogue.bo

Examples of it.eng.spagobi.mapcatalogue.bo.GeoFeature


private void newDetailFeature(SourceBean response) throws EMFUserError {
 
  try {       
    this.modalita = SpagoBIConstants.DETAIL_INS;
    response.setAttribute("modality", modalita);
    GeoFeature feature = new GeoFeature();
    feature.setFeatureId(-1);
    feature.setDescr("");
    feature.setName("");
    feature.setType("");
    response.setAttribute("featureObj", feature);
  } catch (Exception ex) {
    TracerSingleton.log(SpagoBIConstants.NAME_MODULE, TracerSingleton.MAJOR, "Cannot prepare page for the insertion" + ex.getLocalizedMessage());   
    throw new EMFUserError(EMFErrorSeverity.ERROR, 100);
  }
View Full Code Here


 
}


private GeoFeature recoverFeatureDetails (SourceBean request) throws EMFUserError {
  GeoFeature feature  = new GeoFeature();
  String idStr = (String)request.getAttribute("ID");
  Integer id = new Integer(idStr);
  String description = (String)request.getAttribute("DESCR")
  String name = (String)request.getAttribute("NAME");
  String type = (String)request.getAttribute("TYPE");

  feature.setFeatureId(id.intValue());
  feature.setName(name);
  feature.setDescr(description);
  feature.setType(type);
 
  return feature;
  }
View Full Code Here

  logger.debug("IN");
  String toReturn = null;
  try {
      ISbiGeoMapFeaturesDAO mapFeaturesDAO = DAOFactory.getSbiGeoMapFeaturesDAO();
      ISbiGeoFeaturesDAO featureDAO = DAOFactory.getSbiGeoFeaturesDAO();
      GeoFeature tmpFeature = featureDAO.loadFeatureByName(featureName);
      if (tmpFeature == null)
    return null;
      List lstMaps = mapFeaturesDAO.loadMapNamesByFeatureId(new Integer(tmpFeature.getFeatureId()));
      if (lstMaps != null) {
    for (int i = 0; i < lstMaps.size(); i++) {
        toReturn = ((toReturn == null) ? "" : toReturn) + (String) lstMaps.get(i)
          + ((i == lstMaps.size() - 1) ? "" : ",");
    }
View Full Code Here

      Transaction tx = session.beginTransaction();
      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

      while (mapsIt.hasNext()) {
        GeoMap map = (GeoMap) mapsIt.next();
        List mapFeatures = mapFeaturesDAO.loadFeaturesByMapId(new Integer(map.getMapId()));
        Iterator mapFeaturesIt = mapFeatures.iterator();
        while (mapFeaturesIt.hasNext()) {
          GeoFeature feature = (GeoFeature) mapFeaturesIt.next();
          GeoMapFeature mapFeature = mapFeaturesDAO.loadMapFeatures(new Integer(map.getMapId()), new Integer(feature.getFeatureId()));
          SbiGeoMapFeatures hibMapFeature = new SbiGeoMapFeatures()
          SbiGeoMapFeaturesId hibMapFeatureId = new SbiGeoMapFeaturesId();     
          hibMapFeatureId.setMapId(mapFeature.getMapId());
          hibMapFeatureId.setFeatureId(mapFeature.getFeatureId());
          hibMapFeature.setId(hibMapFeatureId);
View Full Code Here

   *
   * @return the corrispondent output <code>GeoFeature</code>
   */
  public GeoFeature toGeoFeature(){
   
    GeoFeature feature = new GeoFeature();
    feature.setFeatureId(getFeatureId());
    feature.setName(getName());
    feature.setDescr(getDescr());
    feature.setType(getType());
 
    /*
    List maps = new ArrayList(); 
    Set hibMaps = hibFeature.getSbiGeoMapFeatureses();     
    for (Iterator it = hibMaps.iterator(); it.hasNext(); ) {
View Full Code Here

   * @throws EMFUserError the EMF user error
   *
   * @see it.eng.spagobi.mapcatalogue.dao.geo.bo.dao.ISbiGeoFeaturesDAO#loadFeatureByID(integer)
   */
  public GeoFeature loadFeatureByID(Integer featureID) throws EMFUserError {
    GeoFeature toReturn = null;
    Session tmpSession = null;
    Transaction tx = null;

    try {
      tmpSession = getSession();
View Full Code Here

   * @throws EMFUserError the EMF user error
   *
   * @see it.eng.spagobi.mapcatalogue.dao.geo.bo.dao.ISbiGeoFeaturesDAO#loadFeatureByName(string)
   */
  public GeoFeature loadFeatureByName(String name) throws EMFUserError {
    GeoFeature biFeature = null;
    Session tmpSession = null;
    Transaction tx = null;
    try {
      tmpSession = getSession();
      tx = tmpSession.beginTransaction();
View Full Code Here

      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

      List hibList = hqlQuery.list();
     
      Iterator it = hibList.iterator();
      ISbiGeoFeaturesDAO featuresDAO = DAOFactory.getSbiGeoFeaturesDAO();
      SbiGeoMapFeatures tmpMapFeature = null;
      GeoFeature tmpFeature = null;
      while (it.hasNext()) {     
        tmpMapFeature = (SbiGeoMapFeatures) it.next();
        SbiGeoMapFeaturesId tmpMapFeatureId = tmpMapFeature.getId();       
        tmpFeature = featuresDAO.loadFeatureByID(new Integer(tmpMapFeatureId.getFeatureId()));
   
        if (tmpFeature != null)
          realResult.add((String)tmpFeature.getName());
      }
      tx.commit();
    } catch (HibernateException he) {
      logException(he);
View Full Code Here

TOP

Related Classes of it.eng.spagobi.mapcatalogue.bo.GeoFeature

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.