Subversion Repositories SmartDukaan

Rev

Rev 24417 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
24407 govind 1
/**
2
 * 
3
 */
4
package com.spice.profitmandi.dao.entity.cs;
5
 
6
import javax.persistence.Column;
7
import javax.persistence.Entity;
8
import javax.persistence.EnumType;
9
import javax.persistence.Enumerated;
10
import javax.persistence.GeneratedValue;
11
import javax.persistence.GenerationType;
12
import javax.persistence.Id;
13
import javax.persistence.Table;
14
 
15
import com.spice.profitmandi.dao.enumuration.cs.EscalationType;
16
 
17
/**
18
 * @author govind
19
 *
20
 */
21
@Entity
22
@Table(name="cs.position" ,schema="cs")
23
public class Position {
24
 
25
	@Id
26
	@Column(name="id", unique=true, updatable=false)
27
	@GeneratedValue(strategy = GenerationType.IDENTITY)
28
	private int id;
29
 
30
	@Column(name="auth_user_id")
31
	private int authUserId;
32
 
33
	@Column(name="category_id")
34
	private int categoryId;
35
 
36
	@Column(name="escalation_type")
37
	@Enumerated(EnumType.STRING)
38
	private EscalationType escalationType;
39
 
40
	public int getId() {
41
		return id;
42
	}
43
 
44
	public void setId(int id) {
45
		this.id = id;
46
	}
47
 
48
	public int getAuthUserId() {
49
		return authUserId;
50
	}
51
 
52
	public void setAuthUserId(int authUserId) {
53
		this.authUserId = authUserId;
54
	}
55
 
56
	public int getCategoryId() {
57
		return categoryId;
58
	}
59
 
60
	public void setCategoryId(int categoryId) {
61
		this.categoryId = categoryId;
62
	}
63
 
64
	public EscalationType getEscalationType() {
65
		return escalationType;
66
	}
67
 
68
	public void setEscalationType(EscalationType escalationType) {
69
		this.escalationType = escalationType;
70
	}
71
 
72
	@Override
73
	public int hashCode() {
74
		final int prime = 31;
75
		int result = 1;
76
		result = prime * result + authUserId;
77
		result = prime * result + categoryId;
78
		result = prime * result + ((escalationType == null) ? 0 : escalationType.hashCode());
79
		result = prime * result + id;
80
		return result;
81
	}
82
 
83
	@Override
84
	public boolean equals(Object obj) {
85
		if (this == obj)
86
			return true;
87
		if (obj == null)
88
			return false;
89
		if (getClass() != obj.getClass())
90
			return false;
91
		Position other = (Position) obj;
92
		if (authUserId != other.authUserId)
93
			return false;
94
		if (categoryId != other.categoryId)
95
			return false;
96
		if (escalationType != other.escalationType)
97
			return false;
98
		if (id != other.id)
99
			return false;
100
		return true;
101
	}
102
 
103
	@Override
104
	public String toString() {
105
		return "Position [id=" + id + ", authUserId=" + authUserId + ", categoryId=" + categoryId + ", escalationType="
106
				+ escalationType + "]";
107
	}
108
 
109
 
110
 
111
}