Examples of RecursoBean


Examples of es.emergya.bbdd.bean.notmapped.RecursoBean

                + "r.tipo as \"tipoRecurso\", s.nombre as "
                + "subflota, r.dispositivo as dispositivo from recursos as r join flotas s on r.flota_x_flota = s.x_flota "
                + "where r.dispositivo = :DISPOSITIVO");
    query.setInteger("DISPOSITIVO", issi);
    query.setResultTransformer(Transformers.aliasToBean(RecursoBean.class));
    RecursoBean recurso = (RecursoBean) query.uniqueResult();

    return recurso;

  }
View Full Code Here

Examples of es.emergya.bbdd.bean.notmapped.RecursoBean

  public void processPosicionActual(Inbox entrada, Geometry geom)
      throws MessageProcessingException {
    HistoricoGPS historicoGPS = new HistoricoGPS();
    historicoGPS.setMarcaTemporal(entrada.getMarcaTemporal());

    RecursoBean recurso = RecursoConsultas.findByDispositivoSQL(entrada
        .getOrigen());
    if (recurso == null) {
      throw new MessageProcessingException("No encuentro el recurso "
          + entrada.getOrigen());
    }

    if (recurso.getHabilitado()) {
      historicoGPS.setTipoRecurso(recurso.getTipoRecurso());
      if (recurso.getSubflota() == null) {
        throw new MessageProcessingException("El recurso " + recurso
            + " no tiene asignada ninguna flota.");
      }
      historicoGPS.setSubflota(recurso.getSubflota());
      historicoGPS.setRecurso(recurso.getIdentificador());

      geom.setSRID(4326);
      //
      // final String sourceSRID = "EPSG:4326";
      // final String targetSRID = "EPSG:3395";
      //
      // Geometry geom = transform(geom, sourceSRID, targetSRID);

      historicoGPS.setGeom(geom);
      historicoGPS.setPosX(geom.getCentroid().getX());
      historicoGPS.setPosY(geom.getCentroid().getY());

      // HistoricoGPSAdmin.saveServer(historicoGPS);
      RecursoAdmin.updateLastGpsSQL(historicoGPS, recurso.getId());
      // recurso.setHistoricoGps(historicoGPS);
      // RecursoAdmin.saveOrUpdate(recurso);
    }
  }
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.