1 43 package net.jforum.security; 44 45 import java.io.Serializable ; 46 47 51 public class Role implements Serializable 52 { 53 private int id; 54 private int groupId; 55 private int userId; 56 private String name; 57 private int type; 58 private RoleValueCollection roleValues = new RoleValueCollection(); 59 60 public void setId(int id) 61 { 62 this.id = id; 63 } 64 65 public void setGroupId(int groupId) 66 { 67 this.groupId = groupId; 68 } 69 70 public void setUserId(int userId) 71 { 72 this.userId = userId; 73 } 74 75 public void setName(String name) 76 { 77 this.name = name; 78 } 79 80 public void setType(int type) 81 { 82 this.type = type; 83 } 84 85 public int getId() 86 { 87 return this.id; 88 } 89 90 public int getGroupId() 91 { 92 return this.groupId; 93 } 94 95 public int getUserId() 96 { 97 return this.userId; 98 } 99 100 public String getName() 101 { 102 return this.name; 103 } 104 105 public int getType() 106 { 107 return this.type; 108 } 109 110 public RoleValueCollection getValues() 111 { 112 return this.roleValues; 113 } 114 115 118 public boolean equals(Object o) 119 { 120 if (!(o instanceof Role)) { 121 return false; 122 } 123 124 return (((Role)o).getId() == this.id); 125 } 126 127 130 public int hashCode() 131 { 132 return this.id; 133 } 134 135 138 public String toString() 139 { 140 return "[name=" + this.name + ", type=" + this.type + ", values=(" + this.roleValues + ")]"; 141 } 142 143 } 144 | Popular Tags |