wiped AsSimpleList Methods from EntityRelation
authorrk <rk>
Sun, 17 Feb 2002 22:33:35 +0000 (22:33 +0000)
committerrk <rk>
Sun, 17 Feb 2002 22:33:35 +0000 (22:33 +0000)
source/mir/entity/EntityRelation.java
source/mircoders/entity/EntityContent.java
source/mircoders/storage/DatabaseContent.java

index edd296b..5fe44f9 100755 (executable)
@@ -98,53 +98,6 @@ public class EntityRelation {
   }
 
   /**
-   *   @return Liefert eine freemarker.template.SimpleList mit den verknuepften
-   *           Entities, wenn es sich um eine TO_MANY Liste handelt, ansonsten
-   *           null.
-   */
-
-  public SimpleList getManyAsSimpleList(Entity entity)
-    throws StorageObjectException {
-
-    if (type==TO_MANY) {
-      EntityList returnList = getMany(entity);
-      if (returnList!=null) return HTMLTemplateProcessor.makeSimpleList(returnList);
-    }
-    return null;
-  }
-
-  /**
-   *   @return Liefert eine freemarker.template.SimpleList mit den verknuepften
-   *           Entities, wenn es sich um eine TO_MANY Liste handelt, ansonsten
-   *           null.
-   */
-
-  public SimpleList getManyAsSimpleList(Entity entity, String order)
-    throws StorageObjectException {
-
-    if (type==TO_MANY) {
-      EntityList returnList = getMany(entity, order);
-      if (returnList!=null) return HTMLTemplateProcessor.makeSimpleList(returnList);
-    }
-    return null;
-  }
-
-  /**
-   *   @return Liefert eine freemarker.template.SimpleList mit den verknuepften
-   *           Entities, wenn es sich um eine TO_MANY Liste handelt, ansonsten
-   *           null.
-   */
-
-  public SimpleList getManyAsSimpleList(Entity entity, String order, String whereClause)
-    throws StorageObjectException {
-
-    if (type==TO_MANY) {
-      EntityList returnList = getMany(entity, order, whereClause);
-      if (returnList!=null) return HTMLTemplateProcessor.makeSimpleList(returnList);
-    }
-    return null;
-  }
-  /**
    *   @return Liefert den Referenznamen der abhaengigen Tabelle
    */
 
index 958f697..46fa13d 100755 (executable)
@@ -283,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);
        }
 
index 2e3a4dc..624b116 100755 (executable)
@@ -43,7 +43,7 @@ public class DatabaseContent extends Database implements StorageObject {
     super();
     this.theTable="content";
     this.theCoreTable="media";
-               
+
     relationComments = new EntityRelation("id", "to_media", DatabaseComment.getInstance(), EntityRelation.TO_MANY);
     relationFeature = new EntityRelation("id", "to_feature", DatabaseFeature.getInstance(), EntityRelation.TO_ONE);
     try { this.theEntityClass = Class.forName("mircoders.entity.EntityContent"); }
@@ -74,29 +74,15 @@ public class DatabaseContent extends Database implements StorageObject {
    * returns the comments that belong to the article (via entityrelation)
    * where db-flag is_published is true
    */
-  public SimpleList getComments(EntityContent entC) throws StorageObjectException {
-    SimpleList comments=null;
-    try {
-      comments = relationComments.getManyAsSimpleList(entC,"webdb_create","is_published='1'");
-    }
-    catch (StorageObjectException e) {
-      _throwStorageObjectException(e, "DatabaseComments :: failed to get comments");
-    }
-    return comments;
+  public EntityList getComments(EntityContent entC) throws StorageObjectException {
+    return relationComments.getMany(entC,"webdb_create","is_published='1'");
   }
 
   /**
    * returns the features that belong to the article (via entityrelation)
    */
-  public SimpleList getFeature(EntityContent entC) throws StorageObjectException {
-    SimpleList feature=null;
-    try {
-      feature = relationFeature.getManyAsSimpleList(entC);
-    }
-    catch (StorageObjectException e) {
-      _throwStorageObjectException(e, "DatabaseComments :: failed to get features");
-    }
-    return feature;
+  public EntityList getFeature(EntityContent entC) throws StorageObjectException {
+    return relationFeature.getMany(entC);
   }
 
   public boolean delete(String id) throws StorageObjectException