fixing scaling images -> nullpointer, patch by yossarian
[mir.git] / source / mircoders / storage / DatabaseContentToTopics.java
index 18ae652..f1d4633 100755 (executable)
@@ -33,8 +33,7 @@ package mircoders.storage;
 import mir.entity.EntityList;
 import mir.log.LoggerWrapper;
 import mir.storage.Database;
-import mir.storage.Database;
-import mir.storage.StorageObjectFailure;
+import mir.storage.DatabaseFailure;
 import mircoders.entity.EntityContent;
 import mircoders.entity.EntityTopics;
 
@@ -97,7 +96,7 @@ public class DatabaseContentToTopics extends Database {
    * Returns a List of String-Objects from a content-id.
    */
   public List getTopicsOfContent(String contentId)
-    throws StorageObjectFailure {
+    throws DatabaseFailure {
     ArrayList returnList = new ArrayList();
 
     if (contentId != null) {
@@ -138,14 +137,14 @@ public class DatabaseContentToTopics extends Database {
     return result;
   }
 
-  public void setTopics(String anArticleId, String [] aTopics) throws StorageObjectFailure {
+  public void setTopics(String anArticleId, String [] aTopics) throws DatabaseFailure {
     if (aTopics==null)
       setTopics(anArticleId, (List) null);
     else
       setTopics(anArticleId, Arrays.asList(aTopics));
   }
 
-  public void setTopics(String anArticleId, List aTopics) throws StorageObjectFailure {
+  public void setTopics(String anArticleId, List aTopics) throws DatabaseFailure {
     List newTopics = new ArrayList();
     if (aTopics!=null) {
       Iterator i = aTopics.iterator();
@@ -219,7 +218,7 @@ public class DatabaseContentToTopics extends Database {
   }
 
   public void deleteByContentId(String contentId)
-    throws StorageObjectFailure {
+    throws DatabaseFailure {
     if (contentId == null) {
       //theLog.printDebugInfo("-- delete topics failed -- no content id");
       return;
@@ -241,7 +240,7 @@ public class DatabaseContentToTopics extends Database {
   }
 
   public void deleteByTopicId(String topicId)
-    throws StorageObjectFailure {
+    throws DatabaseFailure {
     if (topicId == null) {
       //theLog.printDebugInfo("-- delete topics failed -- no topic id");
       return;
@@ -268,10 +267,10 @@ public class DatabaseContentToTopics extends Database {
  * Returns list of Content for a specific topic
  * @param topic
  * @return EntityList
- * @throws StorageObjectFailure
+ * @throws DatabaseFailure
  */
   public EntityList getContent(EntityTopics topic)
-    throws StorageObjectFailure {
+    throws DatabaseFailure {
     EntityList returnList=null;
     if (topic != null) {
       String id = topic.getId();