KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jahia > services > categories > CategoryBean


1 package org.jahia.services.categories;
2
3 import java.io.Serializable JavaDoc;
4
5 /**
6  * <p>Title: Category bean, representing a row in the category database
7  * table</p>
8  * <p>Description: </p>
9  * <p>Copyright: Copyright (c) 2002</p>
10  * <p>Company: Jahia Ltd</p>
11  *
12  * @author Serge Huber
13  * @version 1.0
14  */

15
16 class CategoryBean implements Serializable JavaDoc {
17     private int id = 0;
18     private String JavaDoc key = null;
19     private int aclID = 0;
20
21     /**
22      * Empty constructor, the data may be set in this bean using the setter
23      * methods.
24      */

25     public CategoryBean () {
26     }
27
28     /**
29      * Existing data constructor
30      *
31      * @param id the database identifier for the category
32      * @param key the unique key name for the category
33      * @param aclID an existing ACL ID
34      */

35     public CategoryBean (int id, String JavaDoc key, int aclID) {
36         this.id = id;
37         this.key = key;
38         this.aclID = aclID;
39     }
40
41     /**
42      * @return the database identifier for the category
43      */

44     public int getId () {
45         return id;
46     }
47
48     protected void setId (int id) {
49         this.id = id;
50     }
51
52     /**
53      * @return the category key (unique) name
54      */

55     public String JavaDoc getKey () {
56         return key;
57     }
58
59     /**
60      * Sets the category key (unique) name
61      *
62      * @param key the unique identifier for the category
63      */

64     public void setKey (String JavaDoc key) {
65         this.key = key;
66     }
67
68     /**
69      * @return acl identifier for the category
70      */

71     public int getAclID () {
72         return aclID;
73     }
74
75     /**
76      * Set the ACL identifier for the category
77      *
78      * @param aclID a valid ACL identifier that must exist in the database
79      * (this method does not check this)
80      */

81     public void setAclID (int aclID) {
82         this.aclID = aclID;
83     }
84
85 }
86
Popular Tags