MResource: added toString() method, useful for logging

This commit is contained in:
teo_sarca 2008-08-27 09:17:34 +00:00
parent 419f471088
commit 35ca25e2ee
1 changed files with 12 additions and 0 deletions

View File

@ -33,6 +33,8 @@ import org.compiere.util.CCache;
*/ */
public class MResource extends X_S_Resource public class MResource extends X_S_Resource
{ {
private static final long serialVersionUID = 1L;
/** Cache */ /** Cache */
private static CCache<Integer, MResource> s_cache = new CCache<Integer, MResource>(Table_Name, 20); private static CCache<Integer, MResource> s_cache = new CCache<Integer, MResource>(Table_Name, 20);
@ -149,4 +151,14 @@ public class MResource extends X_S_Resource
return success; return success;
} // afterSave } // afterSave
public String toString()
{
StringBuffer sb = new StringBuffer ("MResource[")
.append(get_ID())
.append(", Value=").append(getValue())
.append(", Name=").append(getName())
.append("]");
return sb.toString();
}
} // MResource } // MResource