/[Apache-SVN]/incubator/derby/code/trunk/java/client/org/apache/derby/client/am/Lob.java
ViewVC logotype

Diff of /incubator/derby/code/trunk/java/client/org/apache/derby/client/am/Lob.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- incubator/derby/code/trunk/java/client/org/apache/derby/client/am/Lob.java	2005/05/02 05:18:08	165584
+++ incubator/derby/code/trunk/java/client/org/apache/derby/client/am/Lob.java	2005/05/02 06:25:59	165585
@@ -20,83 +20,81 @@
 
 package org.apache.derby.client.am;
 
-public abstract class Lob implements UnitOfWorkListener
-{
-  // The following flags specify the data type(s) a LOB instance currently contains
-  public static final int STRING = 2;
-  public static final int ASCII_STREAM = 4;
-  public static final int UNICODE_STREAM = 8;
-  public static final int CHARACTER_STREAM = 16;
-  public static final int BINARY_STREAM = 32;
-  public static final int BINARY_STRING = 64;
-
-  //---------------------navigational members-----------------------------------
-  protected Agent agent_;
-
-  //-----------------------------state------------------------------------------
-  protected int dataType_ = 0;      // data type(s) the LOB instance currently contains
-
-  protected long sqlLength_;      // length of the LOB value, as defined by the server
-  protected boolean lengthObtained_;
-
-  //---------------------constructors/finalizer---------------------------------
-  protected Lob (Agent agent)
-  {
-    agent_ = agent;
-    lengthObtained_ = false;
-  }
+public abstract class Lob implements UnitOfWorkListener {
+    // The following flags specify the data type(s) a LOB instance currently contains
+    public static final int STRING = 2;
+    public static final int ASCII_STREAM = 4;
+    public static final int UNICODE_STREAM = 8;
+    public static final int CHARACTER_STREAM = 16;
+    public static final int BINARY_STREAM = 32;
+    public static final int BINARY_STRING = 64;
+
+    //---------------------navigational members-----------------------------------
+    protected Agent agent_;
+
+    //-----------------------------state------------------------------------------
+    protected int dataType_ = 0;      // data type(s) the LOB instance currently contains
+
+    protected long sqlLength_;      // length of the LOB value, as defined by the server
+    protected boolean lengthObtained_;
+
+    //---------------------constructors/finalizer---------------------------------
+    protected Lob(Agent agent) {
+        agent_ = agent;
+        lengthObtained_ = false;
+    }
 
-  protected void finalize () throws java.lang.Throwable
-  {
-    super.finalize();
-  }
+    protected void finalize() throws java.lang.Throwable {
+        super.finalize();
+    }
 
-  // ---------------------------jdbc 2------------------------------------------
+    // ---------------------------jdbc 2------------------------------------------
 
-  // should only be called by a synchronized method.
+    // should only be called by a synchronized method.
 
 
-  // should only be called by a synchronized method.
-  public long sqlLength () throws SqlException
-  {
-    checkForClosedConnection ();
+    // should only be called by a synchronized method.
+    public long sqlLength() throws SqlException {
+        checkForClosedConnection();
 
-    return sqlLength_;
-  }
+        return sqlLength_;
+    }
 
 
-  //-----------------------event callback methods-------------------------------
+    //-----------------------event callback methods-------------------------------
 
-  public void listenToUnitOfWork()
-  {
-    agent_.connection_.CommitAndRollbackListeners_.add (this);
-  }
+    public void listenToUnitOfWork() {
+        agent_.connection_.CommitAndRollbackListeners_.add(this);
+    }
 
-  public void completeLocalCommit (java.util.Iterator listenerIterator)
-  {
-    listenerIterator.remove();
-  }
+    public void completeLocalCommit(java.util.Iterator listenerIterator) {
+        listenerIterator.remove();
+    }
 
-  public void completeLocalRollback (java.util.Iterator listenerIterator)
-  {
-    listenerIterator.remove();
-  }
+    public void completeLocalRollback(java.util.Iterator listenerIterator) {
+        listenerIterator.remove();
+    }
 
-  //----------------------------helper methods----------------------------------
+    //----------------------------helper methods----------------------------------
 
-  public Agent getAgent () { return agent_; }
+    public Agent getAgent() {
+        return agent_;
+    }
 
-  void checkForClosedConnection () throws SqlException
-  {
-    if (agent_.connection_.isClosedX()) {
-      agent_.checkForDeferredExceptions();
-      throw new SqlException (agent_.logWriter_, "Lob method called after connection was closed");
+    void checkForClosedConnection() throws SqlException {
+        if (agent_.connection_.isClosedX()) {
+            agent_.checkForDeferredExceptions();
+            throw new SqlException(agent_.logWriter_, "Lob method called after connection was closed");
+        } else {
+            agent_.checkForDeferredExceptions();
+        }
     }
-    else {
-      agent_.checkForDeferredExceptions();
+
+    void completeLocalRollback() {
+        ;
     }
-  }
 
-  void completeLocalRollback() { ; }
-  void completeLocalCommit() { ; }
+    void completeLocalCommit() {
+        ;
+    }
 }

 

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26