\r
package mircoders.storage;\r
\r
-import java.lang.*;\r
-import java.sql.*;\r
-import java.io.*;\r
-import java.util.*;\r
-import freemarker.template.*;\r
-import mir.storage.*;\r
-import mir.entity.*;\r
-import mir.misc.*;\r
-import mir.util.*;\r
+import java.sql.Connection;\r
+import java.sql.PreparedStatement;\r
+import java.sql.ResultSet;\r
+import java.sql.SQLException;\r
+import java.util.ArrayList;\r
+import java.util.HashMap;\r
+\r
+import mir.entity.Entity;\r
+import mir.storage.Database;\r
+import mir.storage.StorageObject;\r
+import mir.storage.StorageObjectFailure;\r
+import mir.util.JDBCStringRoutines;\r
\r
\r
/**\r
// could get preemted and we could end up with 2 instances of DatabaseFoo..\r
// see the "Singletons with needles and thread" article at JavaWorld -mh\r
public synchronized static DatabaseLinksImcs getInstance() throws\r
- StorageObjectException {\r
+ StorageObjectFailure {\r
if (instance == null) {\r
instance = new DatabaseLinksImcs();\r
instance.myselfDatabase = instance;\r
/**\r
* put your documentation comment here\r
*/\r
- private DatabaseLinksImcs() throws StorageObjectException {\r
+ private DatabaseLinksImcs() throws StorageObjectFailure {\r
super();\r
////this.cache = new HashMap();\r
this.hasTimestamp = false;\r
this.theEntityClass = Class.forName("mircoders.entity.EntityLinksImcs");\r
}\r
catch (Exception e) {\r
- throw new StorageObjectException(e.toString());\r
+ throw new StorageObjectFailure(e);\r
}\r
}\r
\r
/** @todo toooo much copy/paste in this class //rk */\r
\r
- public String insert(Entity theEntity) throws StorageObjectException {\r
+ public String insert(Entity theEntity) throws StorageObjectFailure {\r
String returnId = "0";\r
Connection con = null;\r
PreparedStatement pstmt = null;\r
return returnId;\r
}\r
\r
- public void update(Entity theEntity) throws StorageObjectException {\r
+ public void update(Entity theEntity) throws StorageObjectFailure {\r
Connection con = null;\r
PreparedStatement pstmt = null;\r
ArrayList streamedInput = theEntity.streamedInput();\r