changed the behaviour of entity uploaded media so that articles/comments linking...
authorzapata <zapata>
Tue, 21 Feb 2006 20:24:43 +0000 (20:24 +0000)
committerzapata <zapata>
Tue, 21 Feb 2006 20:24:43 +0000 (20:24 +0000)
source/mircoders/entity/EntityUploadedMedia.java

index 3003aa0..b28cdb1 100755 (executable)
@@ -34,43 +34,15 @@ import mir.entity.Entity;
 import mir.storage.DatabaseFailure;
 import mircoders.storage.DatabaseUploadedMedia;
 
-import java.sql.SQLException;
 import java.util.Map;
 
 /**
  *
  * @author mh, mir-coders group
- * @version $Id: EntityUploadedMedia.java,v 1.26.2.14 2005/12/23 21:56:28 zapata Exp $
+ * @version $Id: EntityUploadedMedia.java,v 1.26.2.15 2006/02/21 20:24:43 zapata Exp $
  */
 
 public class EntityUploadedMedia extends AbstractEntity {
-  public void update() throws DatabaseFailure {
-    super.update();
-
-    try {
-      database.executeUpdate(
-          "update content " +
-          "set is_produced='0' " +
-          "from content_x_media cxm " +
-          "where" +
-          "   cxm.content_id=content.id and cxm.media_id=" + getId()
-      );
-
-      database.executeUpdate(
-          "update content " +
-          "set is_produced='0' " +
-          "from comment_x_media cxm, comment c "+
-          "where " +
-          "   cxm.comment_id = c.id and " +
-          "   c.to_media=content.id and " +
-          "   cxm.media_id=" + getId()
-      );
-    }
-    catch (SQLException e) {
-      throw new DatabaseFailure(e);
-    }
-  }
-
   public void setFieldValues(Map theStringValues) {
     if (theStringValues != null) {
       if (!theStringValues.containsKey("is_published"))