Modified: 
incubator/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatementCallbackInterface.java
URL: 
http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatementCallbackInterface.java?rev=165585&r1=165584&r2=165585&view=diff
==============================================================================
--- 
incubator/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatementCallbackInterface.java
 (original)
+++ 
incubator/derby/code/trunk/java/client/org/apache/derby/client/am/PreparedStatementCallbackInterface.java
 Sun May  1 23:25:59 2005
@@ -27,10 +27,11 @@
 //
 // The event interfaces are undergoing change, new events will be added soon
 // We want coarse grained event methods, rather than fine-grained events
-public interface PreparedStatementCallbackInterface extends 
StatementCallbackInterface
-{
 
-  public void completeDescribeInput (ColumnMetaData parameterMetaData, Sqlca 
sqlca);
-  public void completeDescribeOutput (ColumnMetaData resultSetMetaData, Sqlca 
sqlca);
+public interface PreparedStatementCallbackInterface extends 
StatementCallbackInterface {
+
+    public void completeDescribeInput(ColumnMetaData parameterMetaData, Sqlca 
sqlca);
+
+    public void completeDescribeOutput(ColumnMetaData resultSetMetaData, Sqlca 
sqlca);
 
 }

Modified: 
incubator/derby/code/trunk/java/client/org/apache/derby/client/am/ProductLevel.java
URL: 
http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/client/org/apache/derby/client/am/ProductLevel.java?rev=165585&r1=165584&r2=165585&view=diff
==============================================================================
--- 
incubator/derby/code/trunk/java/client/org/apache/derby/client/am/ProductLevel.java
 (original)
+++ 
incubator/derby/code/trunk/java/client/org/apache/derby/client/am/ProductLevel.java
 Sun May  1 23:25:59 2005
@@ -19,77 +19,77 @@
 */
 package org.apache.derby.client.am;
 
-public class ProductLevel
-{
-  public String databaseProductName_;
-  public  int versionLevel_;
-  public  int releaseLevel_;
-  public  int modificationLevel_;
+public class ProductLevel {
+    public String databaseProductName_;
+    public int versionLevel_;
+    public int releaseLevel_;
+    public int modificationLevel_;
 
-  // The following value is sent in the srvrlslv level
-  public  String databaseProductVersion_;
+    // The following value is sent in the srvrlslv level
+    public String databaseProductVersion_;
 
-  // The productID is set by the constructors.
-  // dabaseProductVersion added by derby to include  srvrlslv
-  public ProductLevel (String productID, String databaseProductName,
-                                          String srvrlslv)
-  {
-    // this.productID has the following format
-    //   CSS for Derby
-    // vv = version id
-    // rr = release id
-    // m = modification level
-    versionLevel_ = Integer.parseInt (productID.substring (3, 5));
-    releaseLevel_ = Integer.parseInt (productID.substring (5, 7));
-    modificationLevel_ = Integer.parseInt (productID.substring (7, 8));
-    databaseProductName_ = (databaseProductName == null) ?
-               "Derby" : databaseProductName; // This is the srvclsnm in 
PROTOCOL.
+    // The productID is set by the constructors.
+    // dabaseProductVersion added by derby to include  srvrlslv
+    public ProductLevel(String productID, String databaseProductName,
+                        String srvrlslv) {
+        // this.productID has the following format
+        //   CSS for Derby
+        // vv = version id
+        // rr = release id
+        // m = modification level
+        versionLevel_ = Integer.parseInt(productID.substring(3, 5));
+        releaseLevel_ = Integer.parseInt(productID.substring(5, 7));
+        modificationLevel_ = Integer.parseInt(productID.substring(7, 8));
+        databaseProductName_ = (databaseProductName == null) ?
+                "Derby" : databaseProductName; // This is the srvclsnm in 
PROTOCOL.
 
-       // databaseProductVersion - extracted from the srvrlslv.
-       // srvrlslv has the format <PRDID>/<ALTERNATE VERSION FORMAT>
-       // for example Derby has a four part verison number so might send
-       // CSS10000/10.0.1.1 beta. If the alternate version format is not
-       // specified,
-       // databaseProductVersion_ will just be set to the srvrlslvl.
-       // final fallback will be the product id.
-       // this is the value returned with the getDatabaseProductVersion()
-       // metadata call
-       int dbVersionOffset = 0;
-       if (srvrlslv != null)
-       {
-               dbVersionOffset = srvrlslv.indexOf('/') + 1;
-               // if there was no '/' dbVersionOffset will just be 0
-               databaseProductVersion_ = srvrlslv.substring(dbVersionOffset);
-       }
-       if (databaseProductVersion_  == null)
-               databaseProductVersion_ = productID;
-  }
+        // databaseProductVersion - extracted from the srvrlslv.
+        // srvrlslv has the format <PRDID>/<ALTERNATE VERSION FORMAT>
+        // for example Derby has a four part verison number so might send
+        // CSS10000/10.0.1.1 beta. If the alternate version format is not
+        // specified,
+        // databaseProductVersion_ will just be set to the srvrlslvl.
+        // final fallback will be the product id.
+        // this is the value returned with the getDatabaseProductVersion()
+        // metadata call
+        int dbVersionOffset = 0;
+        if (srvrlslv != null) {
+            dbVersionOffset = srvrlslv.indexOf('/') + 1;
+            // if there was no '/' dbVersionOffset will just be 0
+            databaseProductVersion_ = srvrlslv.substring(dbVersionOffset);
+        }
+        if (databaseProductVersion_ == null) {
+            databaseProductVersion_ = productID;
+        }
+    }
 
-  public boolean greaterThanOrEqualTo (int versionLevel, int releaseLevel, int 
modificationLevel)
-  {
-    if (versionLevel_ > versionLevel)
-      return true;
-    else if (versionLevel_ == versionLevel) {
-      if (releaseLevel_ > releaseLevel)
-        return true;
-      else if (releaseLevel_ == releaseLevel)
-        if (modificationLevel_ >= modificationLevel)
-          return true;
+    public boolean greaterThanOrEqualTo(int versionLevel, int releaseLevel, 
int modificationLevel) {
+        if (versionLevel_ > versionLevel) {
+            return true;
+        } else if (versionLevel_ == versionLevel) {
+            if (releaseLevel_ > releaseLevel) {
+                return true;
+            } else if (releaseLevel_ == releaseLevel) {
+                if (modificationLevel_ >= modificationLevel) {
+                    return true;
+                }
+            }
+        }
+        return false;
     }
-    return false;
-  }
 
-  public boolean lessThan (int versionLevel, int releaseLevel, int 
modificationLevel)
-  {
-    if (versionLevel_ < versionLevel)
-      return true;
-    else if (versionLevel_ == versionLevel) {
-      if (releaseLevel_ < releaseLevel)
-        return true;
-      else if (releaseLevel_ == releaseLevel)
-        if (modificationLevel_ < modificationLevel)
-          return true;
+    public boolean lessThan(int versionLevel, int releaseLevel, int 
modificationLevel) {
+        if (versionLevel_ < versionLevel) {
+            return true;
+        } else if (versionLevel_ == versionLevel) {
+            if (releaseLevel_ < releaseLevel) {
+                return true;
+            } else if (releaseLevel_ == releaseLevel) {
+                if (modificationLevel_ < modificationLevel) {
+                    return true;
+                }
+            }
+        }
+        return false;
     }
-    return false;
-  }
 }

Modified: 
incubator/derby/code/trunk/java/client/org/apache/derby/client/am/QueryTimerTask.java
URL: 
http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/client/org/apache/derby/client/am/QueryTimerTask.java?rev=165585&r1=165584&r2=165585&view=diff
==============================================================================
--- 
incubator/derby/code/trunk/java/client/org/apache/derby/client/am/QueryTimerTask.java
 (original)
+++ 
incubator/derby/code/trunk/java/client/org/apache/derby/client/am/QueryTimerTask.java
 Sun May  1 23:25:59 2005
@@ -19,37 +19,33 @@
 */
 package org.apache.derby.client.am;
 
-public class QueryTimerTask extends java.util.TimerTask
-{
-  private Statement statement_;
-  private java.util.Timer timer_;
+public class QueryTimerTask extends java.util.TimerTask {
+    private Statement statement_;
+    private java.util.Timer timer_;
 
-  public QueryTimerTask (Statement statement, java.util.Timer timer)
-  {
-    statement_ = statement;
-    timer_ = timer;
-  }
+    public QueryTimerTask(Statement statement, java.util.Timer timer) {
+        statement_ = statement;
+        timer_ = timer;
+    }
 
-  public void run ()
-  {
-    timer_.cancel(); // method call on java.util.Timer to kill the timer 
thread that triggered this task thread
-       try {
-         statement_.cancel(); // jdbc cancel
-       }
-       catch (SqlException e) {
-          SqlWarning warning = new SqlWarning (statement_.agent_.logWriter_,
-           "An exception occurred while trying to cancel a statement that has 
timed out." +
-            " See chained SQLException.");
-          warning.setNextException (e);
-          statement_.accumulateWarning (warning);
-       }
-    boolean notYetRun = this.cancel(); // method call on java.util.TimerTask 
to kill this task thread.
-    if (notYetRun) {
-        // The following is most likely just a bugcheck - but we'll see.
-        // May be able to remove it later.
-      SqlWarning warning = new SqlWarning (statement_.agent_.logWriter_,
-       "An unexpected error occurred while trying to cancel a statement that 
has timed out.");
-      statement_.accumulateWarning (warning);
+    public void run() {
+        timer_.cancel(); // method call on java.util.Timer to kill the timer 
thread that triggered this task thread
+        try {
+            statement_.cancel(); // jdbc cancel
+        } catch (SqlException e) {
+            SqlWarning warning = new SqlWarning(statement_.agent_.logWriter_,
+                    "An exception occurred while trying to cancel a statement 
that has timed out." +
+                    " See chained SQLException.");
+            warning.setNextException(e);
+            statement_.accumulateWarning(warning);
+        }
+        boolean notYetRun = this.cancel(); // method call on 
java.util.TimerTask to kill this task thread.
+        if (notYetRun) {
+            // The following is most likely just a bugcheck - but we'll see.
+            // May be able to remove it later.
+            SqlWarning warning = new SqlWarning(statement_.agent_.logWriter_,
+                    "An unexpected error occurred while trying to cancel a 
statement that has timed out.");
+            statement_.accumulateWarning(warning);
+        }
     }
-   }
 }

Modified: 
incubator/derby/code/trunk/java/client/org/apache/derby/client/am/ResourceUtilities.java
URL: 
http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/client/org/apache/derby/client/am/ResourceUtilities.java?rev=165585&r1=165584&r2=165585&view=diff
==============================================================================
--- 
incubator/derby/code/trunk/java/client/org/apache/derby/client/am/ResourceUtilities.java
 (original)
+++ 
incubator/derby/code/trunk/java/client/org/apache/derby/client/am/ResourceUtilities.java
 Sun May  1 23:25:59 2005
@@ -22,42 +22,34 @@
 
 import org.apache.derby.client.resources.ResourceKeys;
 
-public final class ResourceUtilities
-{
-  private final static Object[] emptyArgs__ = new Object[] {};
+public final class ResourceUtilities {
+    private final static Object[] emptyArgs__ = new Object[]{};
 
-  // Get resourced text and substitute arguments into text delimited with {i}
-  // using Java's builtin message formatter.
-  static public String getResource (String key, Object[] args)
-  {
-    try {
-      return java.text.MessageFormat.format 
(Configuration.dncResources__.getString (key), args);
+    // Get resourced text and substitute arguments into text delimited with {i}
+    // using Java's builtin message formatter.
+    static public String getResource(String key, Object[] args) {
+        try {
+            return 
java.text.MessageFormat.format(Configuration.dncResources__.getString(key), 
args);
+        } catch (java.util.MissingResourceException e) {
+            try {
+                return 
java.text.MessageFormat.format(Configuration.dncResources__.getString(ResourceKeys.missingResource__01),
+                        new Object[]{e.getKey(), e.getClassName()});
+            } catch (java.util.MissingResourceException e2) {
+                return java.text.MessageFormat.format("No resource for key {0} 
could be found in resource bundle {1}.",
+                        new Object[]{e.getKey(), e.getClassName()});
+            }
+        }
     }
-    catch (java.util.MissingResourceException e) {
-      try {
-        return java.text.MessageFormat.format (
-          Configuration.dncResources__.getString 
(ResourceKeys.missingResource__01),
-          new Object[] {e.getKey(), e.getClassName ()});
-      }
-      catch (java.util.MissingResourceException e2) {
-        return java.text.MessageFormat.format (
-          "No resource for key {0} could be found in resource bundle {1}.",
-          new Object[] {e.getKey(), e.getClassName ()});
-      }
-    }
-  }
 
-  static public String getResource (String key)
-  {
-    return getResource (key, emptyArgs__);
-  }
+    static public String getResource(String key) {
+        return getResource(key, emptyArgs__);
+    }
 
-  // This method is necessary for java.text.MessageFormat.format to work
-  // properly because arguments may not be null.
-  static String getMessage (java.lang.Exception e)
-  {
-    return (e.getMessage() == null) ? "" : e.getMessage();
-  }
+    // This method is necessary for java.text.MessageFormat.format to work
+    // properly because arguments may not be null.
+    static String getMessage(java.lang.Exception e) {
+        return (e.getMessage() == null) ? "" : e.getMessage();
+    }
 
 }
 


Reply via email to