Package cl.loso.melon.server.model

Examples of cl.loso.melon.server.model.ImagenLN


      List<ImagenLN> lstImg = (List<ImagenLN>) query.executeWithMap(pars);
     
      if(!lstImg.isEmpty()){
        Iterator<ImagenLN> ite=lstImg.iterator();
        while(ite.hasNext()){
          ImagenLN img=ite.next();
          //log.info("imagen = " + img.getIdUsuario());
          img.setIdNovedad(idNovedad);
        }
      }
     
    } catch (Exception e) {
      log.error(e.getMessage());
View Full Code Here


  }
 
  public static ImagenLN getFoto(Long id) {
    PersistenceManager pm = PMF.get().getPersistenceManager();
    ImagenLN foto, detached = null;
    try {
        foto = pm.getObjectById(ImagenLN.class, id);
          detached = pm.detachCopy(foto);
    } catch (Exception e) {
      log.error(e.getMessage());
View Full Code Here

      fos=new ByteArrayOutputStream();
      IOUtils.copy(is, fos);
      log.info("tama�o : " + fos.size());
      imagen=fos.toByteArray();
      Blob blob=new Blob(imagen);
      ImagenLN imagenln=new ImagenLN(new Date(),blob,Long.valueOf(idUsuario),Long.valueOf(idEquipo));
      NovedadLNDAO.guardarfoto(imagenln);
      res.setStatus(res.SC_OK);
      writer.print("{success: true}");
     
     
View Full Code Here

    byte[] imagen=null;
    ServletOutputStream out=null;
    try {
      id=req.getParameter("id");
     
      ImagenLN img=NovedadLNDAO.getFoto(Long.valueOf(id));
      imagen=img.getFoto().getBytes();
      res.setContentType("image/jpg");
      out = res.getOutputStream();
      out.write(imagen);
     
    } catch (Exception ex) {
View Full Code Here

TOP

Related Classes of cl.loso.melon.server.model.ImagenLN

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.