wiped AsSimpleList Methods from EntityRelation
[mir.git] / source / mircoders / entity / EntityContent.java
index 047f6bf..46fa13d 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!! */
@@ -211,7 +213,7 @@ public class EntityContent extends Entity
       }
       else if (key.equals("to_topics")) {
         try {
-          HTMLTemplateProcessor.makeSimpleList(DatabaseContentToTopics.getInstance().getTopics(this));
+          DatabaseContentToTopics.getInstance().getTopics(this);
         }
         catch (Exception ex) {
           theLog.printWarning("-- getTopics: could not fetch data " + ex.toString());
@@ -281,7 +283,7 @@ public class EntityContent extends Entity
         *
         * @return freemarker.template.SimpleList
         */
-       private SimpleList getComments() throws StorageObjectException {
+       private EntityList getComments() throws StorageObjectException {
                return ((DatabaseContent)theStorageObject).getComments(this);
        }
 
@@ -340,32 +342,28 @@ public class EntityContent extends Entity
 
   //######## @todo all of the following getBlahForContent should have
   // and optimized version where LIMIT=1 sql for list view.
-  private SimpleList getImagesForContent()
+  private EntityList getImagesForContent()
     throws StorageObjectException, TemplateModelException
   {
-    return HTMLTemplateProcessor.makeSimpleList(
-             DatabaseContentToMedia.getInstance().getImages(this) );
+    return DatabaseContentToMedia.getInstance().getImages(this);
   }
 
-  private SimpleList getAudioForContent()
+  private EntityList getAudioForContent()
     throws StorageObjectException, TemplateModelException
   {
-    return HTMLTemplateProcessor.makeSimpleList(
-             DatabaseContentToMedia.getInstance().getAudio(this) );
+    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);
   }
 
 }