01: package com.technoetic.xplanner.domain;
02:
03: import java.io.Serializable;
04:
05: public class RoleAssociation implements Serializable {
06: private int projectId;
07: private int personId;
08: private int roleId;
09:
10: RoleAssociation() {
11: // Hibernate
12: }
13:
14: public RoleAssociation(int projectId, int personId, int roleId) {
15: this .projectId = projectId;
16: this .personId = personId;
17: this .roleId = roleId;
18: }
19:
20: public int getProjectId() {
21: return projectId;
22: }
23:
24: public void setProjectId(int projectId) {
25: this .projectId = projectId;
26: }
27:
28: public int getPersonId() {
29: return personId;
30: }
31:
32: public void setPersonId(int personId) {
33: this .personId = personId;
34: }
35:
36: public int getRoleId() {
37: return roleId;
38: }
39:
40: public void setRoleId(int roleId) {
41: this .roleId = roleId;
42: }
43:
44: public boolean equals(Object o) {
45: if (this == o)
46: return true;
47: if (!(o instanceof RoleAssociation))
48: return false;
49:
50: final RoleAssociation roleAssociation = (RoleAssociation) o;
51:
52: if (personId != roleAssociation.personId)
53: return false;
54: if (projectId != roleAssociation.projectId)
55: return false;
56: if (roleId != roleAssociation.roleId)
57: return false;
58:
59: return true;
60: }
61:
62: public int hashCode() {
63: int result;
64: result = projectId;
65: result = 29 * result + personId;
66: result = 29 * result + roleId;
67: return result;
68: }
69:
70: public String toString() {
71: return "RoleAssociation(" + "personId=" + this .getPersonId()
72: + ", projectId=" + this .getProjectId() + ", roleId="
73: + this .getRoleId() + ")";
74: }
75: }
|