cleanup / abuse system fix / prepping for a release
[mir.git] / source / mir / storage / Database.java
index e8faec5..5550c87 100755 (executable)
@@ -45,7 +45,9 @@ import org.postgresql.PGConnection;
 import org.postgresql.largeobject.LargeObject;
 import org.postgresql.largeobject.LargeObjectManager;
 
-import java.io.*;
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+import java.io.InputStreamReader;
 import java.sql.*;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
@@ -54,7 +56,7 @@ import java.util.*;
 /**
  * Implements database access.
  *
- * @version $Id: Database.java,v 1.44.2.32 2005/04/16 18:37:23 zapata Exp $
+ * @version $Id: Database.java,v 1.44.2.33 2005/08/21 17:09:21 zapata Exp $
  * @author rk
  * @author Zapata
  *
@@ -180,8 +182,6 @@ public class Database {
             break;
 
           case java.sql.Types.NUMERIC:
-            /** todo Numeric can be float or double depending upon
-             *  metadata.getScale() / especially with oracle */
             long outl = aResultSet.getLong(aFieldIndex);
 
             if (!aResultSet.wasNull()) {
@@ -393,8 +393,6 @@ public class Database {
       anExtraTables=null;
     }
 
-    RecordRetriever retriever = new RecordRetriever(mainTable, aMainTablePrefix);
-
     // check o_store for entitylist
     // only if no relational select
     if (anExtraTables==null) {
@@ -411,6 +409,8 @@ public class Database {
       }
     }
 
+    RecordRetriever retriever = new RecordRetriever(mainTable, aMainTablePrefix);
+
     EntityList result = null;
     Connection connection = null;
 
@@ -577,7 +577,6 @@ public class Database {
 
     String returnId = null;
     Connection con = null;
-    PreparedStatement pstmt = null;
 
     try {
       String fieldName;
@@ -610,7 +609,6 @@ public class Database {
       freeConnection(con);
     }
 
-    /** todo store entity in o_store */
     return returnId;
   }
 
@@ -707,7 +705,6 @@ public class Database {
   public boolean delete(String id) throws DatabaseFailure {
        invalidateObject(id);
        
-    /** todo could be prepared Statement */
     int resultCode = 0;
     Connection connection = obtainConnection();
     PreparedStatement statement = null;