producerContent debugging / pageCount inserted
[mir.git] / source / mircoders / entity / EntityContent.java
index bccc7cf..958f697 100755 (executable)
@@ -56,9 +56,11 @@ public class EntityContent extends Entity
 
        public void setProduced(boolean yesno) throws StorageObjectException
        {
-               Connection con=null;Statement stmt=null;
                String value = (yesno) ? "1":"0";
-               String sql = "update content set is_produced='" + value + "' where id='" + getId()+"'";
+               if (value.equals( getValue("is_produced") )) return;
+
+    Connection con=null;Statement stmt=null;
+    String sql = "update content set is_produced='" + value + "' where id='" + getId()+"'";
                try {
                        con = theStorageObject.getPooledCon();
                        /** @todo should be preparedStatement: faster!! */
@@ -352,18 +354,16 @@ public class EntityContent extends Entity
     return DatabaseContentToMedia.getInstance().getAudio(this) ;
   }
 
-  private SimpleList getVideoForContent()
+  private EntityList getVideoForContent()
     throws StorageObjectException, TemplateModelException
   {
-    return HTMLTemplateProcessor.makeSimpleList(
-             DatabaseContentToMedia.getInstance().getVideo(this) );
+    return DatabaseContentToMedia.getInstance().getVideo(this) ;
   }
 
-  private SimpleList getOtherMediaForContent()
+  private EntityList getOtherMediaForContent()
     throws StorageObjectException, TemplateModelException
   {
-    return HTMLTemplateProcessor.makeSimpleList(
-             DatabaseContentToMedia.getInstance().getOther(this) );
+    return DatabaseContentToMedia.getInstance().getOther(this);
   }
 
 }