*/
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;
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.
* @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;
logger = new LoggerWrapper("Entity.List");
}
-/* get/set EntityClass of Objects stored in EntityList */
public void setStorage(Database aStorage) {
storage=aStorage;
}
}
/**
- * 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
}
/**
- * Returns the sorting criterium.
- *
- * @return orderClause The sort order
- */
- public String getOrder() {
- return orderClause;
- }
-
- /**
* Sets the offset
*
* @param i The offset
public void add (Entity anEntity) {
if (anEntity!=null)
- theEntityArrayList.add(anEntity);
+ entities.add(anEntity);
else
logger.warn("EntityList: add called with empty Entity");
}
*/
public int size() {
- return theEntityArrayList.size();
+ return entities.size();
}
*/
public Entity elementAt(int i) {
- /** todo check if i is in list.size() */
- return (Entity) theEntityArrayList.get(i);
+ return (Entity) entities.get(i);
}