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"))