1 package mircoders.entity;
15 * This class maps one line of the comment-table to a java-object.
22 public class EntityComment extends AbstractEntity implements Entity
24 private static int instances;
26 public EntityComment()
32 public EntityComment(StorageObject theStorage) {
34 setStorage(theStorage);
37 public HashMap getValues() {
38 HashMap returnHash = super.getValues();
39 String create = (String)returnHash.get("webdb_create");
40 returnHash.put("date",StringUtil.dateToReadableDate(create));
46 * overridden method setValues to patch creator_main_url
48 public void setValues(HashMap theStringValues)
50 if (theStringValues != null) {
51 if (!theStringValues.containsKey("is_published"))
52 theStringValues.put("is_published","0");
53 if (theStringValues.containsKey("main_url"))
54 if (((String)theStringValues.get("main_url")).equalsIgnoreCase("http://")) {
55 theStringValues.remove("main_url");
56 } else if (!((String)theStringValues.get("main_url")).startsWith("http://")){
57 theStringValues.put("main_url","http://"+((String)theStringValues.get("main_url")));
60 super.setValues(theStringValues);
64 public void finalize() {