db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r617294 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java
Date Thu, 31 Jan 2008 23:40:32 GMT
Author: kahatlen
Date: Thu Jan 31 15:40:28 2008
New Revision: 617294

URL: http://svn.apache.org/viewvc?rev=617294&view=rev
Log:
An attempt to restore history for EmbedBlob.java after being replaced
rather than updated by check-in for DERBY-3365.

$ cd java/engine/org/apache/derby/impl/jdbc
$ cp EmbedBlob.java EmbedBlob.java.old
$ svn remove EmbedBlob.java
$ svn copy -r 617185 EmbedBlob.java .
$ cp EmbedBlob.java.old EmbedBlob.java
$ svn ci

Added:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java
      - copied, changed from r617185, db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java

Copied: db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java (from r617185,
db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java)
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java?p2=db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java&p1=db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java&r1=617185&r2=617294&rev=617294&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/jdbc/EmbedBlob.java Thu Jan 31 15:40:28
2008
@@ -24,13 +24,11 @@
 
 import org.apache.derby.iapi.reference.SQLState;
 import org.apache.derby.iapi.error.StandardException;
+import org.apache.derby.iapi.jdbc.EngineBlob;
 import org.apache.derby.iapi.services.monitor.Monitor;
 import org.apache.derby.iapi.services.sanity.SanityManager;
 import org.apache.derby.iapi.types.DataValueDescriptor;
 import org.apache.derby.iapi.types.Resetable;
-import org.apache.derby.impl.jdbc.ConnectionChild;
-import org.apache.derby.impl.jdbc.EmbedConnection;
-import org.apache.derby.impl.jdbc.Util;
 import org.apache.derby.iapi.services.io.NewByteArrayInputStream;
 import org.apache.derby.iapi.services.io.InputStreamUtil;
 import org.apache.derby.iapi.services.io.ArrayInputStream;
@@ -70,12 +68,15 @@
 
  */
 
-final class EmbedBlob extends ConnectionChild implements Blob
+final class EmbedBlob extends ConnectionChild implements Blob, EngineBlob
 {
     // blob is either materialized or still in stream
     private boolean         materialized;
     private InputStream     myStream;
     
+    // locator key for lob. used by Network Server.
+    private final int             locator;
+    
     /*
      * Length of the BLOB if known. Set to -1 if
      * the current length of the BLOB is not known.
@@ -116,7 +117,7 @@
              materialized = true;
              //add entry in connection so it can be cleared 
              //when transaction is not valid
-             con.addLOBMapping (this);
+             locator = con.addLOBMapping (this);
          }
          catch (IOException e) {
              throw Util.setStreamFailure (e);
@@ -192,7 +193,7 @@
         pos = 0;
         //add entry in connection so it can be cleared 
         //when transaction is not valid
-        con.addLOBMapping (this);
+        this.locator = con.addLOBMapping (this);
     }
 
 
@@ -991,5 +992,14 @@
      */
     boolean isMaterialized () {
         return materialized;
+    }
+
+    /**
+     * Return locator for this lob.
+     * 
+     * @return
+     */
+    public int getLocator() {
+        return locator;
     }
 }



Mime
View raw message