X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=source%2Fmir%2Fentity%2FAbstractEntity.java;h=108f4247cfd47b657ad7ef53a1f276bdd408eafc;hb=f2c82f962d2da630470760b0cadbcef91dec680d;hp=a56572edc41511cf26f4c2aca49630e248e94482;hpb=95c2e3a74f492f6f61d4dbe8bb47996f43af0627;p=mir.git diff --git a/source/mir/entity/AbstractEntity.java b/source/mir/entity/AbstractEntity.java index a56572ed..108f4247 100755 --- a/source/mir/entity/AbstractEntity.java +++ b/source/mir/entity/AbstractEntity.java @@ -44,7 +44,7 @@ import mir.storage.Database; * Base class the entities are derived from. Provides base functionality of * an entity. * - * @version $Id: AbstractEntity.java,v 1.8.2.7 2005/03/26 11:26:23 zapata Exp $ + * @version $Id: AbstractEntity.java,v 1.8.2.8 2005/10/30 00:46:57 zapata Exp $ */ public class AbstractEntity implements Entity { @@ -52,11 +52,8 @@ public class AbstractEntity implements Entity { protected Map values; protected Database database; - protected LoggerWrapper logger; public AbstractEntity() { - logger = new LoggerWrapper("Entity"); - values = new HashMap(); } @@ -90,7 +87,7 @@ public class AbstractEntity implements Entity { /** {@inheritDoc} */ public String insert() throws DatabaseExc { - logger.debug("Entity: trying to insert ..."); + getLogger().debug("Entity: trying to insert ..."); if (database != null) { return database.insert(this); @@ -130,7 +127,7 @@ public class AbstractEntity implements Entity { if (hasField(theProp)) values.put(theProp, theValue); else { - logger.warn("Entity.setFieldValue: Property not found: " + theProp + " (" + theValue + ")"); + getLogger().warn("Entity.setFieldValue: Property not found: " + theProp + " (" + theValue + ")"); } } @@ -149,5 +146,9 @@ public class AbstractEntity implements Entity { public boolean hasField(String fieldName) throws DatabaseFailure { return getFieldNames().contains(fieldName); } + + protected LoggerWrapper getLogger() { + return new LoggerWrapper("Entity"); + } }