1 31 package org.blojsom.blog.database; 32 33 import org.blojsom.blog.Category; 34 import org.blojsom.util.BlojsomUtils; 35 36 import java.io.Serializable ; 37 import java.util.Map ; 38 import java.util.HashMap ; 39 40 47 public class DatabaseCategory implements Category, Serializable { 48 49 private Integer _id; 50 private Integer _parentCategoryId; 51 private Integer _blogId; 52 private Category _parentCategory; 53 54 protected String _name; 55 protected Map _metaData = null; 56 protected String _description = null; 57 58 61 public DatabaseCategory() { 62 } 63 64 69 public Integer getId() { 70 return _id; 71 } 72 73 78 public void setId(Integer id) { 79 _id = id; 80 } 81 82 87 public Integer getParentCategoryId() { 88 return _parentCategoryId; 89 } 90 91 96 public void setParentCategoryId(Integer parentCategoryId) { 97 _parentCategoryId = parentCategoryId; 98 } 99 100 105 public Integer getBlogId() { 106 return _blogId; 107 } 108 109 114 public void setBlogId(Integer blogId) { 115 _blogId = blogId; 116 } 117 118 123 public void setName(String name) { 124 _name = name; 125 } 126 127 132 public String getName() { 133 return _name; 134 } 135 136 141 public String getEncodedName() { 142 return BlojsomUtils.urlEncodeForLink(_name); 143 } 144 145 150 public void setDescription(String description) { 151 _description = description; 152 } 153 154 159 public String getDescription() { 160 return _description; 161 } 162 163 168 public void setMetaData(Map metaData) { 169 _metaData = metaData; 170 } 171 172 177 public Map getMetaData() { 178 if (_metaData == null) { 179 return new HashMap (); 180 } 181 182 return _metaData; 183 } 184 185 190 public Category getParentCategory() { 191 return _parentCategory; 192 } 193 194 199 public void setParentCategory(Category parentCategory) { 200 _parentCategory = parentCategory; 201 } 202 } 203 | Popular Tags |