comment out some debug logging that spews out each SQL select, insert, etc..
authormh <mh>
Tue, 10 Dec 2002 09:05:07 +0000 (09:05 +0000)
committermh <mh>
Tue, 10 Dec 2002 09:05:07 +0000 (09:05 +0000)
source/mir/storage/Database.java

index f2182ac..a571908 100755 (executable)
@@ -55,7 +55,7 @@ import  mir.misc.*;
  * Treiber, Host, User und Passwort, ueber den der Zugriff auf die
  * Datenbank erfolgt.
  *
- * @version $Revision: 1.21.2.2 $ $Date: 2002/11/26 01:52:55 $
+ * @version $Revision: 1.21.2.3 $ $Date: 2002/12/10 09:05:07 $
  * @author $Author: mh $
  *
  */
@@ -720,7 +720,7 @@ public class Database implements StorageObject {
                        // insert into db
                        StringBuffer sqlBuf = new StringBuffer("insert into ").append(theTable).append("(").append(f).append(") values (").append(v).append(")");
                        String sql = sqlBuf.toString();
-                       theLog.printInfo("INSERT: " + sql);
+                       //theLog.printInfo("INSERT: " + sql);
                        con = getPooledCon();
                        con.setAutoCommit(false);
                        pstmt = con.prepareStatement(sql);
@@ -837,7 +837,7 @@ public class Database implements StorageObject {
                        }
                }
                sql.append(" where id=").append(id);
-               theLog.printInfo("UPDATE: " + sql);
+               //theLog.printInfo("UPDATE: " + sql);
                // execute sql
                try {
                        con = getPooledCon();
@@ -885,7 +885,7 @@ public class Database implements StorageObject {
                Statement stmt = null; Connection con = null;
                int res = 0;
                String sql="delete from "+theTable+" where "+thePKeyName+"='"+id+"'";
-               theLog.printInfo("DELETE " + sql);
+               //theLog.printInfo("DELETE " + sql);
                try {
                        con = getPooledCon(); stmt = con.createStatement();
                        res = stmt.executeUpdate(sql);
@@ -1093,8 +1093,7 @@ public class Database implements StorageObject {
                        freeConnection(con,stmt);
                }
                //theLog.printInfo(theTable + " has "+ result +" rows where " + where);
-               theLog.printInfo((System.currentTimeMillis() - startTime) + "ms. for: "
-                                                                               + sql);
+               //theLog.printInfo((System.currentTimeMillis() - startTime) + "ms. for: " + sql);
                return result;
        }
 
@@ -1106,8 +1105,7 @@ public class Database implements StorageObject {
                try
                {
                        rs = stmt.executeUpdate(sql);
-                       theLog.printInfo((new java.util.Date().getTime() - startTime) + "ms. for: "
-                                                                                               + sql);
+                       //theLog.printInfo((new java.util.Date().getTime() - startTime) + "ms. for: " + sql);
                }
                catch (SQLException e)
                {
@@ -1130,12 +1128,11 @@ public class Database implements StorageObject {
                        result = pstmt.executeUpdate();
                }
                catch (Exception e) {
-                       theLog.printDebugInfo("settimage :: setImage gescheitert: "+e.toString());
+                       theLog.printDebugInfo("executeUpdate failed: "+e.toString());
                        throw new StorageObjectException("executeUpdate failed: "+e.toString());
                }
                finally { freeConnection(con,pstmt); }
-               theLog.printInfo((new java.util.Date().getTime() - startTime) + "ms. for: "
-                                                                               + sql);
+               //theLog.printInfo((new java.util.Date().getTime() - startTime) + "ms. for: " + sql);
                return result;
        }
 
@@ -1185,7 +1182,7 @@ public class Database implements StorageObject {
                try {
                        con = getPooledCon();
                        pstmt = con.prepareStatement(sql);
-                       theLog.printInfo("METADATA: " + sql);
+                       //theLog.printInfo("METADATA: " + sql);
                        ResultSet rs = pstmt.executeQuery();
                        evalMetaData(rs.getMetaData());
                        rs.close();