KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > dotmarketing > portlets > folders > model > Folder


1 package com.dotmarketing.portlets.folders.model;
2
3 import java.io.Serializable JavaDoc;
4 import java.util.Map JavaDoc;
5
6 import org.apache.commons.lang.builder.ToStringBuilder;
7
8 import com.dotmarketing.beans.Inode;
9
10 /** @author Hibernate CodeGenerator */
11 public class Folder extends Inode implements Serializable JavaDoc {
12
13     private static final long serialVersionUID = 1L;
14
15     /** nullable persistent field */
16     private String JavaDoc name;
17
18     /** nullable persistent field */
19     private String JavaDoc path;
20
21     /** nullable persistent field */
22     private int sortOrder;
23
24     /** nullable persistent field */
25     private boolean showOnMenu;
26     
27     /** nullable persistent field */
28     private long hostInode;
29
30
31     private String JavaDoc title;
32     /** default constructor */
33     
34     private String JavaDoc filesMasks;
35     
36     public Folder() {
37         this.setType("folder");
38     }
39
40     /**
41      * Returns the inode.
42      * @return long
43      */

44     public long getInode() {
45         return inode;
46     }
47
48     /**
49      * Returns the name.
50      * @return String
51      */

52     public String JavaDoc getName() {
53         return name;
54     }
55
56     /**
57      * Returns the path.
58      * @return String
59      */

60     public String JavaDoc getPath() {
61         return path;
62     }
63
64     /**
65      * Returns the sortOrder.
66      * @return int
67      */

68     public int getSortOrder() {
69         return sortOrder;
70     }
71
72     /**
73      * Sets the inode.
74      * @param inode The inode to set
75      */

76     public void setInode(long inode) {
77         this.inode = inode;
78     }
79
80     /**
81      * Sets the name.
82      * @param name The name to set
83      */

84     public void setName(String JavaDoc name) {
85         this.name = name;
86     }
87
88     /**
89      * Sets the path.
90      * @param path The path to set
91      */

92     public void setPath(String JavaDoc path) {
93         this.path = path;
94     }
95
96     /**
97      * Sets the sortOrder.
98      * @param sortOrder The sortOrder to set
99      */

100     public void setSortOrder(int sortOrder) {
101         this.sortOrder = sortOrder;
102     }
103
104     /**
105      * Returns the showOnMenu.
106      * @return boolean
107      */

108     public boolean isShowOnMenu() {
109         return showOnMenu;
110     }
111
112     /**
113      * Sets the showOnMenu.
114      * @param showOnMenu The showOnMenu to set
115      */

116     public void setShowOnMenu(boolean showOnMenu) {
117         this.showOnMenu = showOnMenu;
118     }
119
120     /**
121      * Returns the title.
122      * @return String
123      */

124     public String JavaDoc getTitle() {
125         return title;
126     }
127
128     /**
129      * Sets the title.
130      * @param title The title to set
131      */

132     public void setTitle(String JavaDoc title) {
133         this.title = title;
134     }
135
136     /* (non-Javadoc)
137      * @see java.lang.Object#toString()
138      */

139     public String JavaDoc toString() {
140         return ToStringBuilder.reflectionToString(this);
141     }
142     
143     /**
144      * @return Returns the hostInode.
145      */

146     public long getHostInode() {
147         return hostInode;
148     }
149     /**
150      * @param hostInode The hostInode to set.
151      */

152     public void setHostInode(long hostInode) {
153         this.hostInode = hostInode;
154     }
155     
156     public void copy (Folder template) {
157         this.setHostInode(template.getHostInode());
158         this.setName(template.getName());
159         this.setShowOnMenu(template.isShowOnMenu());
160         this.setSortOrder(template.getSortOrder());
161         this.setTitle(template.getTitle());
162     }
163
164     public String JavaDoc getFilesMasks() {
165         return filesMasks;
166     }
167
168     public void setFilesMasks(String JavaDoc filesMasks) {
169         this.filesMasks = filesMasks;
170     }
171
172     public Map JavaDoc<String JavaDoc, Object JavaDoc> getMap() {
173         Map JavaDoc<String JavaDoc, Object JavaDoc> retMap = super.getMap();
174         retMap.put("filesMasks", this.filesMasks);
175         retMap.put("name", this.name);
176         retMap.put("path", this.path);
177         retMap.put("title", this.title);
178         retMap.put("hostInode", this.hostInode);
179         retMap.put("showOnMenu", this.showOnMenu);
180         retMap.put("sortOrder", this.sortOrder);
181         return retMap;
182     }
183
184 }
185
Popular Tags