cleanup / abuse system fix / prepping for a release
[mir.git] / source / mir / entity / EntityList.java
index aae8f66..74da98a 100755 (executable)
  */
 package mir.entity;
 
-import java.util.ArrayList;
-import java.util.Set;
-
-import mir.config.MirPropertiesConfiguration;
 import mir.log.LoggerWrapper;
 import mir.storage.Database;
 import mir.storage.store.StorableObject;
@@ -40,6 +36,10 @@ import mir.storage.store.StoreContainerType;
 import mir.storage.store.StoreIdentifier;
 import mir.storage.store.StoreUtil;
 
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
 /**
  *
  * Container class for lists of Entities.
@@ -51,9 +51,8 @@ import mir.storage.store.StoreUtil;
  * @version 1.1 (cleaned up)
  */
 public class EntityList implements StorableObject {
-  protected static MirPropertiesConfiguration configuration  = MirPropertiesConfiguration.instance();
   protected LoggerWrapper logger;
-  private ArrayList           theEntityArrayList = new ArrayList();
+  private List                entities = new ArrayList();
   private String              whereClause, orderClause;
   private Database            storage;
   private int                 offset, limit;
@@ -63,7 +62,6 @@ public class EntityList implements StorableObject {
     logger = new LoggerWrapper("Entity.List");
   }
 
-/* get/set EntityClass of Objects stored in EntityList */
   public void setStorage(Database aStorage) {
     storage=aStorage;
   }
@@ -86,15 +84,6 @@ public class EntityList implements StorableObject {
   }
 
   /**
-   * Returns the WHERE clause that returned this EntityList from the database
-   *
-   * @return whereClause The WHERE clause
-   */
-  public String getWhere() {
-    return whereClause;
-  }
-
-  /**
    * Sets the sorting criterium of this EntityList
    *
    * @param oc
@@ -104,15 +93,6 @@ public class EntityList implements StorableObject {
   }
 
   /**
-   * Returns the sorting criterium.
-   *
-   * @return orderClause The sort order
-   */
-  public String getOrder() {
-    return orderClause;
-  }
-
-  /**
    * Sets the offset
    *
    * @param i The offset
@@ -165,7 +145,7 @@ public class EntityList implements StorableObject {
 
   public void add (Entity anEntity) {
     if (anEntity!=null)
-      theEntityArrayList.add(anEntity);
+      entities.add(anEntity);
     else
       logger.warn("EntityList: add called with empty Entity");
   }
@@ -176,7 +156,7 @@ public class EntityList implements StorableObject {
    */
 
   public int size() {
-    return theEntityArrayList.size();
+    return entities.size();
   }
 
 
@@ -187,8 +167,7 @@ public class EntityList implements StorableObject {
    */
 
   public Entity elementAt(int i) {
-    /** todo check if i is in list.size() */
-    return (Entity) theEntityArrayList.get(i);
+    return (Entity) entities.get(i);
   }