KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > dotmarketing > portlets > categories > model > Category


1 package com.dotmarketing.portlets.categories.model;
2
3 import java.io.Serializable JavaDoc;
4 import java.util.HashMap JavaDoc;
5 import java.util.Map JavaDoc;
6
7 import com.dotmarketing.beans.Inode;
8
9
10 public class Category extends Inode implements Serializable JavaDoc {
11
12     private static final long serialVersionUID = 1L;
13
14     /** persistent field */
15     private String JavaDoc categoryName;
16     private String JavaDoc description;
17     private String JavaDoc key;
18     private int sortOrder;
19     private boolean active;
20     private String JavaDoc keywords;
21     /**
22      * @return Returns the active.
23      */

24     public boolean isActive() {
25         return this.active;
26     }
27     /**
28      * @param active The active to set.
29      */

30     public void setActive(boolean active) {
31         this.active = active;
32     }
33     /** default constructor */
34     public Category() {
35         super.setType("category");
36     }
37
38     /** minimal constructor */
39     public Category(java.lang.String JavaDoc 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 JavaDoc getCategoryName() {
52         return this.categoryName;
53     }
54
55     public void setCategoryName(java.lang.String JavaDoc 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 JavaDoc sortOrder) {
67         try {
68             this.sortOrder = Integer.parseInt(sortOrder);
69         } catch (Exception JavaDoc e) {
70         }
71     }
72
73
74
75     /**
76      * Returns the description.
77      * @return String
78      */

79     public String JavaDoc getDescription() {
80         return description;
81     }
82
83     /**
84      * Sets the description.
85      * @param description The description to set
86      */

87     public void setDescription(String JavaDoc description) {
88         this.description = description;
89     }
90
91     /**
92      * @return Returns the key.
93      */

94     public String JavaDoc getKey() {
95         return this.key;
96     }
97     /**
98      * @param key The key to set.
99      */

100     public void setKey(String JavaDoc key) {
101         this.key = key;
102     }
103     
104     
105     
106     
107     public String JavaDoc getKeywords() {
108         return this.keywords;
109     }
110     public void setKeywords(String JavaDoc keywords) {
111         this.keywords = keywords;
112     }
113     
114     public Map JavaDoc getMap () {
115         HashMap JavaDoc map = new HashMap JavaDoc ();
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