1 package org.javabb.vo; 2 3 import java.io.Serializable ; 4 import java.util.Set ; 5 import org.apache.commons.lang.builder.EqualsBuilder; 6 import org.apache.commons.lang.builder.HashCodeBuilder; 7 import org.apache.commons.lang.builder.ToStringBuilder; 8 9 24 25 29 34 public class Group implements Serializable { 35 36 37 private Long groupId; 38 39 40 private String groupName; 41 42 43 private org.javabb.vo.User user; 44 45 46 private Set userGroups; 47 48 49 private Set GroupModerators; 50 51 52 private Set GroupPermissions; 53 54 55 public Group(Long groupId, String groupName, org.javabb.vo.User user, Set userGroups, Set GroupModerators, Set GroupPermissions) { 56 this.groupId = groupId; 57 this.groupName = groupName; 58 this.user = user; 59 this.userGroups = userGroups; 60 this.GroupModerators = GroupModerators; 61 this.GroupPermissions = GroupPermissions; 62 } 63 64 65 public Group() { 66 } 67 68 69 public Group(Long groupId, org.javabb.vo.User user, Set userGroups, Set GroupModerators, Set GroupPermissions) { 70 this.groupId = groupId; 71 this.user = user; 72 this.userGroups = userGroups; 73 this.GroupModerators = GroupModerators; 74 this.GroupPermissions = GroupPermissions; 75 } 76 77 84 public Long getGroupId() { 85 return this.groupId; 86 } 87 88 public void setGroupId(Long groupId) { 89 this.groupId = groupId; 90 } 91 92 98 public String getGroupName() { 99 return this.groupName; 100 } 101 102 public void setGroupName(String groupName) { 103 this.groupName = groupName; 104 } 105 106 112 public org.javabb.vo.User getUser() { 113 return this.user; 114 } 115 116 public void setUser(org.javabb.vo.User user) { 117 this.user = user; 118 } 119 120 131 public Set getUserGroups() { 132 return this.userGroups; 133 } 134 135 public void setUserGroups(Set userGroups) { 136 this.userGroups = userGroups; 137 } 138 139 150 public Set getGroupModerators() { 151 return this.GroupModerators; 152 } 153 154 public void setGroupModerators(Set GroupModerators) { 155 this.GroupModerators = GroupModerators; 156 } 157 158 169 public Set getGroupPermissions() { 170 return this.GroupPermissions; 171 } 172 173 public void setGroupPermissions(Set GroupPermissions) { 174 this.GroupPermissions = GroupPermissions; 175 } 176 177 public String toString() { 178 return new ToStringBuilder(this) 179 .append("groupId", getGroupId()) 180 .toString(); 181 } 182 183 public boolean equals(Object other) { 184 if ( !(other instanceof Group) ) return false; 185 Group castOther = (Group) other; 186 return new EqualsBuilder() 187 .append(this.getGroupId(), castOther.getGroupId()) 188 .isEquals(); 189 } 190 191 public int hashCode() { 192 return new HashCodeBuilder() 193 .append(getGroupId()) 194 .toHashCode(); 195 } 196 197 } 198 | Popular Tags |