- 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);
- }
- }
-