01: package org.contineo.core.security;
02:
03: /**
04: * This class represents menugroup.
05: *
06: * @author Michael Scholz
07: * @version 1.0
08: */
09: public class MenuGroup {
10:
11: private int writeEnable = 0;
12:
13: private String groupName;
14:
15: public MenuGroup() {
16: }
17:
18: public MenuGroup(String groupName) {
19: this .groupName = groupName;
20: }
21:
22: public String getGroupName() {
23: return groupName;
24: }
25:
26: public int getWriteEnable() {
27: return writeEnable;
28: }
29:
30: public void setGroupName(String gname) {
31: this .groupName = gname;
32: }
33:
34: public void setWriteEnable(int enable) {
35: if ((enable < 0) || (enable > 1)) {
36: writeEnable = 0;
37: } else {
38: writeEnable = enable;
39: }
40: }
41:
42: @Override
43: public boolean equals(Object obj) {
44: if (!(obj instanceof MenuGroup))
45: return false;
46: MenuGroup other = (MenuGroup) obj;
47: return this .getGroupName().equals(other.getGroupName());
48: }
49:
50: @Override
51: public int hashCode() {
52: return groupName.hashCode();
53: }
54: }
|