1 43 package net.jforum.security; 44 45 import java.io.Serializable ; 46 47 51 public class RoleValue implements Serializable 52 { 53 private int roleId; 54 private String value; 55 private int type = PermissionControl.ROLE_DENY; 56 57 public void setRoleId(int roleId) 58 { 59 this.roleId = roleId; 60 } 61 62 public void setValue(String value) 63 { 64 this.value = value; 65 } 66 67 public void setType(int type) 68 { 69 this.type = type; 70 } 71 72 public int getRoleId() 73 { 74 return this.roleId; 75 } 76 77 public String getValue() 78 { 79 return this.value; 80 } 81 82 public int getType() 83 { 84 return this.type; 85 } 86 87 90 public boolean equals(Object o) 91 { 92 if (!(o instanceof RoleValue)) { 93 return false; 94 } 95 96 RoleValue rv = (RoleValue)o; 97 return (rv.getValue().equals(this.value) && rv.getType() == this.type); 98 } 99 100 103 public int hashCode() 104 { 105 return (this.value + this.type).hashCode(); 106 } 107 108 111 public String toString() 112 { 113 return "[" + this.value + ", type=" + this.type + "]"; 114 } 115 116 } 117 | Popular Tags |