moved entities of n:m tables away from ostore caching. no primary key was given....
authorrk <rk>
Mon, 1 Apr 2002 19:43:50 +0000 (19:43 +0000)
committerrk <rk>
Mon, 1 Apr 2002 19:43:50 +0000 (19:43 +0000)
source/mircoders/storage/DatabaseContentToMedia.java
source/mircoders/storage/DatabaseContentToTopics.java

index 1569bb4..90854d7 100755 (executable)
@@ -38,6 +38,8 @@ public class DatabaseContentToMedia extends Database implements StorageObject{
     super();
     this.hasTimestamp = false;
     this.theTable="content_x_media";
+    try { this.theEntityClass = Class.forName("mir.entity.GenericEntity"); }
+    catch (Exception e) { throw new StorageObjectException(e.toString()); }
   }
 
   /**
@@ -81,7 +83,7 @@ public class DatabaseContentToMedia extends Database implements StorageObject{
       throw new StorageObjectException("-- hasMedia failed: content is NULL");
     }
   }
-      
+
 
 
 
index 1eb4137..8fb8a9e 100755 (executable)
@@ -38,6 +38,9 @@ public class DatabaseContentToTopics extends Database implements StorageObject{
     super();
     this.hasTimestamp = false;
     this.theTable="content_x_topic";
+    try { this.theEntityClass = Class.forName("mir.entity.GenericEntity"); }
+    catch (Exception e) { throw new StorageObjectException(e.toString()); }
+
   }
 
   /**
@@ -60,7 +63,7 @@ public class DatabaseContentToTopics extends Database implements StorageObject{
     }
     return returnList;
   }
-  
+
   /**
    * Returns a ArrayList of Integer-Objects from a content-id.
    * @returns ArrayList
@@ -106,7 +109,7 @@ public class DatabaseContentToTopics extends Database implements StorageObject{
     Collection hasTopics = getTopicsOfContent(contentId);
     Collection toSet = new ArrayList();
     Collection toDelete = new ArrayList();
-    
+
     if(hasTopics!=null && hasTopics.size()>0){
       //now we check if there are new topics and copy them to an array.
       for(int i = 0; i< topicId.length;i++){
@@ -148,7 +151,7 @@ public class DatabaseContentToTopics extends Database implements StorageObject{
                                toSet.add(topicId[i]);
                        }
     }
-    
+
     //first delete all row with content_id=contentId
     String sql = "delete from "+ theTable +" where content_id=" + contentId
                 + " and topic_id in (";