Subversion Repositories SmartDukaan

Rev

Rev 21924 | Rev 22014 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 21924 Rev 22009
Line 10... Line 10...
10
import javax.persistence.NamedQueries;
10
import javax.persistence.NamedQueries;
11
import javax.persistence.NamedQuery;
11
import javax.persistence.NamedQuery;
12
import javax.persistence.Table;
12
import javax.persistence.Table;
13
import javax.persistence.UniqueConstraint;
13
import javax.persistence.UniqueConstraint;
14
 
14
 
-
 
15
import com.spice.profitmandi.dao.enumuration.dtr.RoleType;
-
 
16
 
15
/**
17
/**
16
 * This class basically contains api details
18
 * This class basically contains api details
17
 * 
19
 * 
18
 * @author ashikali
20
 * @author ashikali
19
 *
21
 *
Line 40... Line 42...
40
		return id;
42
		return id;
41
	}
43
	}
42
	public void setId(int id) {
44
	public void setId(int id) {
43
		this.id = id;
45
		this.id = id;
44
	}
46
	}
45
	@Column(name="role_id", unique=false, updatable=false)
47
	@Column(name="role_type", unique=false, updatable=false)
46
	private int roleId;
48
	private RoleType roleType;
47
	
49
	
48
	@Column(name="api_id", unique = false)
50
	@Column(name="api_id", unique = false)
49
	private int apiId;
51
	private int apiId;
50
 
52
 
51
	public int getRoleId() {
53
	public RoleType getRoleType() {
52
		return roleId;
54
		return roleType;
53
	}
55
	}
54
 
-
 
55
	public void setRoleId(int roleId) {
56
	public void setRoleType(RoleType roleType) {
56
		this.roleId = roleId;
57
		this.roleType = roleType;
57
	}
58
	}
58
 
59
 
59
	public int getApiId() {
60
	public int getApiId() {
60
		return apiId;
61
		return apiId;
61
	}
62
	}
Line 67... Line 68...
67
	@Override
68
	@Override
68
	public int hashCode() {
69
	public int hashCode() {
69
		final int prime = 31;
70
		final int prime = 31;
70
		int result = 1;
71
		int result = 1;
71
		result = prime * result + apiId;
72
		result = prime * result + apiId;
72
		result = prime * result + id;
-
 
73
		result = prime * result + roleId;
73
		result = prime * result + roleType.getValue();
74
		return result;
74
		return result;
75
	}
75
	}
76
 
76
 
77
	@Override
77
	@Override
78
	public boolean equals(Object obj) {
78
	public boolean equals(Object obj) {
Line 83... Line 83...
83
		if (getClass() != obj.getClass())
83
		if (getClass() != obj.getClass())
84
			return false;
84
			return false;
85
		RoleApi other = (RoleApi) obj;
85
		RoleApi other = (RoleApi) obj;
86
		if (apiId != other.apiId)
86
		if (apiId != other.apiId)
87
			return false;
87
			return false;
88
		if (id != other.id)
-
 
89
			return false;
-
 
90
		if (roleId != other.roleId)
88
		if (roleType != other.roleType)
91
			return false;
89
			return false;
92
		return true;
90
		return true;
93
	}
91
	}
94
 
92
 
95
	@Override
93
	@Override
96
	public String toString() {
94
	public String toString() {
97
		return "RoleApi [id=" + id + ", roleId=" + roleId + ", apiId=" + apiId + "]";
95
		return "RoleApi [id=" + id + ", roleType=" + roleType + ", apiId=" + apiId + "]";
98
	}
96
	}
99
	
97
	
100
}
98
}
101
99