merged 1.1 branch into head
[mir.git] / source / mircoders / storage / DatabaseComment.java
index 400b3fa..8561eb4 100755 (executable)
@@ -36,17 +36,9 @@ import java.sql.Statement;
 
 import mir.log.LoggerWrapper;
 import mir.storage.Database;
-import mir.storage.StorageObject;
-import mir.storage.StorageObjectFailure;
+import mir.storage.DatabaseFailure;
 
-/**
- * <b>This class implements the access to the comment-table for the
- *    media table.
- *
- *
- */
-
-public class DatabaseComment extends Database implements StorageObject{
+public class DatabaseComment extends Database {
 
   private static DatabaseComment instance;
 
@@ -59,14 +51,13 @@ public class DatabaseComment extends Database implements StorageObject{
 
   private DatabaseComment() {
     super();
-    hasTimestamp = false;
     mainTable = "comment";
     logger = new LoggerWrapper("Database.Comment");
 
-    this.theEntityClass = mircoders.entity.EntityComment.class;
+    entityClass = mircoders.entity.EntityComment.class;
   }
 
-  public boolean deleteByContentId(String id) throws StorageObjectFailure {
+  public boolean deleteByContentId(String id) throws DatabaseFailure {
     Statement stmt = null;
     Connection con = null;
     String sql;
@@ -81,7 +72,7 @@ public class DatabaseComment extends Database implements StorageObject{
       stmt.executeUpdate(sql);
     }
     catch (SQLException sqe) {
-      new StorageObjectFailure(sqe);
+      new DatabaseFailure(sqe);
       return false;
     }
     finally {