1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.om.registry.base;
18
19 import org.apache.jetspeed.om.registry.Category;
20
21 /***
22 * Bean like implementation of the Category interface suitable for
23 * Castor serialization.
24 *
25 * @see org.apache.jetspeed.om.registry.Security
26 * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
27 * @version $Id: BaseCategory.java,v 1.4 2004/02/23 03:08:26 jford Exp $
28 */
29 public class BaseCategory implements Category, java.io.Serializable
30 {
31 private String name;
32 private String group = "Jetspeed";
33
34 /***
35 * Implements the equals operation so that 2 elements are equal if
36 * all their member values are equal.
37 */
38 public boolean equals(Object object)
39 {
40 if (object==null)
41 {
42 return false;
43 }
44
45 BaseCategory obj = (BaseCategory)object;
46
47 if (name!=null)
48 {
49 if (!name.equals(obj.getName()))
50 {
51 return false;
52 }
53 }
54 else
55 {
56 if (obj.getName()!=null)
57 {
58 return false;
59 }
60 }
61
62 if (group!=null)
63 {
64 if(!group.equals(obj.getGroup()))
65 {
66 return false;
67 }
68 }
69 else
70 {
71 if (obj.getGroup()!=null)
72 {
73 return false;
74 }
75 }
76
77 return true;
78 }
79
80 /*** @return the string Name */
81 public String getName()
82 {
83 return name;
84 }
85
86 /*** Sets the string Name
87 *
88 * @param value the new Name value
89 */
90 public void setName(String name)
91 {
92 this.name = name;
93 }
94
95 /*** @return the string Group */
96 public String getGroup()
97 {
98 return group;
99 }
100
101 /*** Sets the string Group
102 *
103 * @param value the new Group value
104 */
105 public void setGroup(String group)
106 {
107 this.group = group;
108 }
109
110 }