Subversion Repositories SmartDukaan

Rev

Rev 26014 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
26014 amit.gupta 1
package com.spice.profitmandi.dao.entity.auth;
2
 
3
import java.io.Serializable;
4
 
5
import javax.persistence.Column;
6
import javax.persistence.Entity;
7
import javax.persistence.Id;
8
import javax.persistence.Table;
9
 
10
import com.spice.profitmandi.dao.enumuration.cs.EscalationType;
11
 
12
@Entity
31860 tejbeer 13
@Table(name="auth.menu_category")
26014 amit.gupta 14
public class MenuCategory implements Serializable {
15
	public EscalationType getEscalationType() {
16
		return escalationType;
17
	}
18
 
19
	public void setEscalationType(EscalationType escalationType) {
20
		this.escalationType = escalationType;
21
	}
22
 
23
	private static final long serialVersionUID = 1L;
24
 
25
	@Id
26
	@Column(name = "menu_id")
27
	private int menuId;
28
 
29
	@Id
30
	@Column(name = "category_id")
31
	private int categoryId;
32
 
33
	public int getCategoryId() {
34
		return categoryId;
35
	}
36
 
37
	public void setCategoryId(int categoryId) {
38
		this.categoryId = categoryId;
39
	}
40
 
41
	@Id
42
	@Column(name = "escalation_type")
43
	EscalationType escalationType;
44
 
45
	@Override
46
	public String toString() {
47
		return "MenuCategory [menuId=" + menuId + ", categoryId=" + categoryId + ", escalationType=" + escalationType
48
				+ "]";
49
	}
50
 
51
	public int getMenuId() {
52
		return menuId;
53
	}
54
 
55
	public void setMenuId(int menuId) {
56
		this.menuId = menuId;
57
	}
58
 
59
	@Override
60
	public int hashCode() {
61
		final int prime = 31;
62
		int result = 1;
63
		result = prime * result + categoryId;
64
		result = prime * result + ((escalationType == null) ? 0 : escalationType.hashCode());
65
		result = prime * result + menuId;
66
		return result;
67
	}
68
 
69
	@Override
70
	public boolean equals(Object obj) {
71
		if (this == obj)
72
			return true;
73
		if (obj == null)
74
			return false;
75
		if (getClass() != obj.getClass())
76
			return false;
77
		MenuCategory other = (MenuCategory) obj;
78
		if (categoryId != other.categoryId)
79
			return false;
80
		if (escalationType != other.escalationType)
81
			return false;
82
		if (menuId != other.menuId)
83
			return false;
84
		return true;
85
	}
86
 
87
 
88
}