Subversion Repositories SmartDukaan

Rev

Rev 24407 | Rev 24471 | Go to most recent revision | Details | Compare with Previous | 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
 
24417 govind 6
import java.time.LocalDateTime;
7
 
24407 govind 8
import javax.persistence.Column;
24417 govind 9
import javax.persistence.Convert;
24407 govind 10
import javax.persistence.Entity;
11
import javax.persistence.EnumType;
12
import javax.persistence.Enumerated;
13
import javax.persistence.GeneratedValue;
14
import javax.persistence.GenerationType;
15
import javax.persistence.Id;
16
import javax.persistence.Table;
17
 
24417 govind 18
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
24407 govind 19
import com.spice.profitmandi.dao.enumuration.cs.EscalationType;
20
 
21
/**
22
 * @author govind
23
 *
24
 */
25
@Entity
26
@Table(name="cs.position" ,schema="cs")
27
public class Position {
28
 
29
	@Id
30
	@Column(name="id", unique=true, updatable=false)
31
	@GeneratedValue(strategy = GenerationType.IDENTITY)
32
	private int id;
33
 
34
	@Column(name="auth_user_id")
35
	private int authUserId;
36
 
37
	@Column(name="category_id")
38
	private int categoryId;
39
 
24417 govind 40
	@Column(name="region_id")
41
	private int regionId;
42
 
24407 govind 43
	@Column(name="escalation_type")
44
	@Enumerated(EnumType.STRING)
45
	private EscalationType escalationType;
24417 govind 46
 
47
	@Convert(converter = LocalDateTimeAttributeConverter.class)
48
	@Column(name = "create_timestamp")
49
	private LocalDateTime createTimestamp;
24407 govind 50
 
51
	public int getId() {
52
		return id;
53
	}
54
 
55
	public void setId(int id) {
56
		this.id = id;
57
	}
58
 
59
	public int getAuthUserId() {
60
		return authUserId;
61
	}
62
 
63
	public void setAuthUserId(int authUserId) {
64
		this.authUserId = authUserId;
65
	}
66
 
67
	public int getCategoryId() {
68
		return categoryId;
69
	}
70
 
71
	public void setCategoryId(int categoryId) {
72
		this.categoryId = categoryId;
73
	}
74
 
75
	public EscalationType getEscalationType() {
76
		return escalationType;
77
	}
78
 
79
	public void setEscalationType(EscalationType escalationType) {
80
		this.escalationType = escalationType;
81
	}
82
 
24417 govind 83
	public int getRegionId() {
84
		return regionId;
85
	}
86
 
87
	public void setRegionId(int regionId) {
88
		this.regionId = regionId;
89
	}
90
 
91
	public LocalDateTime getCreateTimestamp() {
92
		return createTimestamp;
93
	}
94
 
95
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
96
		this.createTimestamp = createTimestamp;
97
	}
98
 
24407 govind 99
	@Override
100
	public int hashCode() {
101
		final int prime = 31;
102
		int result = 1;
103
		result = prime * result + authUserId;
104
		result = prime * result + categoryId;
24417 govind 105
		result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
24407 govind 106
		result = prime * result + ((escalationType == null) ? 0 : escalationType.hashCode());
107
		result = prime * result + id;
24417 govind 108
		result = prime * result + regionId;
24407 govind 109
		return result;
110
	}
111
 
112
	@Override
113
	public boolean equals(Object obj) {
114
		if (this == obj)
115
			return true;
116
		if (obj == null)
117
			return false;
118
		if (getClass() != obj.getClass())
119
			return false;
120
		Position other = (Position) obj;
121
		if (authUserId != other.authUserId)
122
			return false;
123
		if (categoryId != other.categoryId)
124
			return false;
24417 govind 125
		if (createTimestamp == null) {
126
			if (other.createTimestamp != null)
127
				return false;
128
		} else if (!createTimestamp.equals(other.createTimestamp))
129
			return false;
24407 govind 130
		if (escalationType != other.escalationType)
131
			return false;
132
		if (id != other.id)
133
			return false;
24417 govind 134
		if (regionId != other.regionId)
135
			return false;
24407 govind 136
		return true;
137
	}
138
 
139
	@Override
140
	public String toString() {
24417 govind 141
		return "Position [id=" + id + ", authUserId=" + authUserId + ", categoryId=" + categoryId + ", regionId="
142
				+ regionId + ", escalationType=" + escalationType + ", createTimestamp=" + createTimestamp + "]";
24407 govind 143
	}
144
 
145
 
146
 
147
}