Package com.sogou.qadev.service.cynthia.bean.impl

Examples of com.sogou.qadev.service.cynthia.bean.impl.AttachmentImpl


      pstm.setTimestamp(5, createTime);
      pstm.setString(6, fileId==null?"":fileId);
      pstm.setBytes(7, data);
      pstm.execute();

      Attachment attachment = new AttachmentImpl(id);
      attachment.setName(name);
      attachment.setCreateUser(username);
      attachment.setCreateTime(createTime);
      attachment.setData(data);
      attachment.setSize(data.length);
      attachment.setFileId(fileId);

      return attachment;
    }
    catch(Exception e){
      e.printStackTrace();
View Full Code Here


        statement.setLong(i + 1, Long.parseLong(ids[i].getValue()));
      }

      rs = statement.executeQuery();
      while (rs.next()){
        Attachment attachment = new AttachmentImpl(DataAccessFactory.getInstance().createUUID(Long.toString(rs.getLong(1))));
        attachment.setSize(rs.getLong(2));
        attachment.setName(rs.getString(3));
        attachment.setCreateUser(rs.getString(4));
        attachment.setCreateTime(rs.getTimestamp(5));
        if (needData){
          //分布式文件系统
//          byte[] data = FileUpDownLoadHandler.downloadData(rs.getString("file_id"));
         
          byte[] data = rs.getBytes("data");
          attachment.setData(data);
        }
        attachmentList.add(attachment);
      }
    }
    catch (Exception e){
View Full Code Here

TOP

Related Classes of com.sogou.qadev.service.cynthia.bean.impl.AttachmentImpl

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.