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;
* 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} */
* 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.