1 package com.dotmarketing.portlets.categories.model; 2 3 import java.io.Serializable ; 4 import java.util.HashMap ; 5 import java.util.Map ; 6 7 import com.dotmarketing.beans.Inode; 8 9 10 public class Category extends Inode implements Serializable { 11 12 private static final long serialVersionUID = 1L; 13 14 15 private String categoryName; 16 private String description; 17 private String key; 18 private int sortOrder; 19 private boolean active; 20 private String keywords; 21 24 public boolean isActive() { 25 return this.active; 26 } 27 30 public void setActive(boolean active) { 31 this.active = active; 32 } 33 34 public Category() { 35 super.setType("category"); 36 } 37 38 39 public Category(java.lang.String categoryName) { 40 this.categoryName = categoryName; 41 } 42 43 public long getInode() { 44 return this.inode; 45 } 46 47 public void setInode(long inode) { 48 this.inode = inode; 49 } 50 51 public java.lang.String getCategoryName() { 52 return this.categoryName; 53 } 54 55 public void setCategoryName(java.lang.String categoryName) { 56 this.categoryName = categoryName; 57 } 58 59 public int getSortOrder() { 60 return this.sortOrder; 61 } 62 63 public void setSortOrder(int sortOrder) { 64 this.sortOrder = sortOrder; 65 } 66 public void setSortOrder(String sortOrder) { 67 try { 68 this.sortOrder = Integer.parseInt(sortOrder); 69 } catch (Exception e) { 70 } 71 } 72 73 74 75 79 public String getDescription() { 80 return description; 81 } 82 83 87 public void setDescription(String description) { 88 this.description = description; 89 } 90 91 94 public String getKey() { 95 return this.key; 96 } 97 100 public void setKey(String key) { 101 this.key = key; 102 } 103 104 105 106 107 public String getKeywords() { 108 return this.keywords; 109 } 110 public void setKeywords(String keywords) { 111 this.keywords = keywords; 112 } 113 114 public Map getMap () { 115 HashMap map = new HashMap (); 116 map.put("categoryName", this.getCategoryName()); 117 map.put("description", this.getDescription()); 118 map.put("key", this.getKey()); 119 map.put("keywords", this.getKeywords()); 120 map.put("sortOrder", this.getSortOrder()); 121 map.put("inode", this.getInode()); 122 return map; 123 } 124 } 125 | Popular Tags |