Package es.ua.dccia.datos

Examples of es.ua.dccia.datos.PeticionDao.find()


        EntityManager em = PersistenceManager.getInstance().createEntityManager();
        em.getTransaction().begin();
        ActualizacionDao adao = new ActualizacionDao(em);
        actualizacion.setFecha(new Date());
        PeticionDao pdao = new PeticionDao(em);
        Peticion peticion = pdao.find(idPeticion);
        if (peticion==null)
            throw new EntidadNoEncontradaException("No existe la petición con id: " + idPeticion);
        actualizacion.setPeticion(peticion);
        adao.create(actualizacion);
        em.getTransaction().commit();
View Full Code Here


    public Peticion getPeticion(long id) {
        EntityManager em = PersistenceManager.getInstance().createEntityManager();
        em.getTransaction().begin();
        PeticionDao pdao = new PeticionDao(em);
        Peticion peticion = pdao.find(id);
        if (peticion!=null)
            for (Destinatario destinatario : peticion.getDestinatarios()) {
                destinatario.getNombre();
            }
        em.getTransaction().commit();
View Full Code Here

        EntityManager em = PersistenceManager.getInstance().createEntityManager();
        em.getTransaction().begin();
       
        //comprobar que la petición existe
        PeticionDao peticionDao = new PeticionDao(em);
        Peticion peticion = peticionDao.find(idPeticion);
        if (peticion==null)
            throw new MueveteException("La petición que estás intentando firmar no existe: " + idPeticion);  
        //lo hacemos distinto según si es una firma autentificada o no
        if (autentificado != null) {
            firma = new FirmaAutentificada();
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.