Package javax.sql.rowset.serial

Examples of javax.sql.rowset.serial.SerialBlob


                      if (blobObject != null) {
                          entity.dangerousSetNoCheckButFast(curField, blobObject);
                      } else {
                        if (originalObject instanceof Blob) {
                          // NOTE using SerialBlob here instead of the Blob from the database to make sure we can pass it around, serialize it, etc
                            entity.dangerousSetNoCheckButFast(curField, new SerialBlob((Blob) originalObject));
                        } else {
                            entity.dangerousSetNoCheckButFast(curField, originalObject);
                        }
                      }
                    }
View Full Code Here


        while (true) {
            try {
                message.getBody();
                stmt = conn.prepareStatement("INSERT INTO " + getTableNameForTopic(topic) + " VALUES(?,?)");
                stmt.setLong(1, seqId);
                stmt.setBlob(2, new SerialBlob(message.toByteArray()));

                int rowCount = stmt.executeUpdate();
                stmt.close();
                if (rowCount != 1) {
                    logger.error("Unexpected number of affected rows from derby");
View Full Code Here

      int i=0;
      while(fileImgStream.available()>0){         
        imgBytes[i] = (byte)fileImgStream.read();
        i++;
      }
      SerialBlob serialBlob = new SerialBlob(imgBytes);
      ps.setBlob(3, serialBlob);
      ps.execute();
      ps.close();
      }catch(IOException ioe){
        ioe.printStackTrace();
View Full Code Here

            throw new SQLException();
        }
        if (params == null) {
            throw new SQLException();
        }
        params.put(Integer.valueOf(parameterIndex - 1), new SerialBlob(x));
    }
View Full Code Here

            if (type.equals(Array.class) && !(value instanceof SerialArray)) {
                return new SerialArray((Array) value);
            }

            if (type.equals(Blob.class) && !(value instanceof SerialBlob)) {
                return new SerialBlob((Blob) value);
            }

            if (type.equals(Clob.class) && !(value instanceof SerialClob)) {
                return new SerialClob((Clob) value);
            }
View Full Code Here

            throw new SQLException();
        }
        if (params == null) {
            throw new SQLException();
        }
        params.put(Integer.valueOf(parameterIndex - 1), new SerialBlob(x));
    }
View Full Code Here

            if (type.equals(Array.class) && !(value instanceof SerialArray)) {
                return new SerialArray((Array) value);
            }

            if (type.equals(Blob.class) && !(value instanceof SerialBlob)) {
                return new SerialBlob((Blob) value);
            }

            if (type.equals(Clob.class) && !(value instanceof SerialClob)) {
                return new SerialClob((Clob) value);
            }
View Full Code Here

            throw new SQLException();
        }
        if (params == null) {
            throw new SQLException();
        }
        params.put(Integer.valueOf(parameterIndex - 1), new SerialBlob(x));
    }
View Full Code Here

                    continue;
                }
                if (obj instanceof Array) {
                    obj = new SerialArray((Array) obj);
                } else if (obj instanceof Blob) {
                    obj = new SerialBlob((Blob) obj);
                } else if (obj instanceof Clob) {
                    obj = new SerialClob((Clob) obj);
                } else if (obj instanceof Ref) {
                    obj = new SerialRef((Ref) obj);
                } else if (obj instanceof URL) {
View Full Code Here

    Blob barcodeBlob = null;
    try {
      if (printJob.getQueuedElements() != null) {
        byte[] rbytes = LimsUtils.objectToByteArray(printJob.getQueuedElements());
        barcodeBlob = new SerialBlob(rbytes);
        params.addValue("printedElements", barcodeBlob);
      }
      else {
        params.addValue("printedElements", null);
      }
View Full Code Here

TOP

Related Classes of javax.sql.rowset.serial.SerialBlob

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.