* anti-abuse upgrade: filters now stored in the database (experimental)
[mir.git] / source / mir / entity / AbstractEntity.java
index dcd493b..5cfd829 100755 (executable)
@@ -35,7 +35,6 @@ import java.util.List;
 import java.util.Map;
 
 import mir.config.MirPropertiesConfiguration;
-import mir.config.MirPropertiesConfiguration.PropertiesConfigExc;
 import mir.log.LoggerWrapper;
 import mir.storage.StorageObject;
 import mir.storage.StorageObjectExc;
@@ -45,44 +44,24 @@ import mir.storage.StorageObjectFailure;
  * Base class the entities are derived from. Provides base functionality of
  * an entity.
  *
- * @version $Id: AbstractEntity.java,v 1.8.2.2 2004/02/08 21:05:00 zapata Exp $
+ * @version $Id: AbstractEntity.java,v 1.8.2.4 2005/01/09 20:37:07 zapata Exp $
  */
 
 public class AbstractEntity implements Entity {
-  protected static MirPropertiesConfiguration configuration;
+  protected static MirPropertiesConfiguration configuration = MirPropertiesConfiguration.instance();
 
   protected Map values;
   protected StorageObject storageObject;
   protected LoggerWrapper logger;
 
-  static {
-    try {
-      configuration = MirPropertiesConfiguration.instance();
-    }
-    catch (PropertiesConfigExc e) {
-      throw new RuntimeException(e.getMessage());
-    }
-  }
-
   public AbstractEntity() {
     logger = new LoggerWrapper("Entity");
 
     values = new HashMap();
   }
 
-  /**
-   * Constructor
-   * @param StorageObject The StorageObject of the Entity.
-   */
-
-  public AbstractEntity(StorageObject StorageObject) {
-    this();
-
-    setStorage(StorageObject);
-  }
-
-  public void setStorage(StorageObject storage) {
-    this.storageObject = storage;
+  public void setStorage(StorageObject aStorageObject) {
+    storageObject = aStorageObject;
   }
 
   /** {@inheritDoc} */
@@ -159,7 +138,7 @@ public class AbstractEntity implements Entity {
    * Returns the field names of the Entity
    */
   public List getFieldNames() throws StorageObjectFailure {
-    return storageObject.getFields();
+    return storageObject.getFieldNames();
   }
 
   /** Returns whether fieldName is a valid field name of this Entity.