Subversion Repositories SmartDukaan

Rev

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

Rev 24407 Rev 24417
Line 1... Line 1...
1
/**
1
/**
2
 * 
2
 * 
3
 */
3
 */
4
package com.spice.profitmandi.dao.entity.cs;
4
package com.spice.profitmandi.dao.entity.cs;
5
 
5
 
-
 
6
import java.time.LocalDateTime;
-
 
7
 
6
import javax.persistence.Column;
8
import javax.persistence.Column;
-
 
9
import javax.persistence.Convert;
7
import javax.persistence.Entity;
10
import javax.persistence.Entity;
8
import javax.persistence.EnumType;
11
import javax.persistence.EnumType;
9
import javax.persistence.Enumerated;
12
import javax.persistence.Enumerated;
10
import javax.persistence.GeneratedValue;
13
import javax.persistence.GeneratedValue;
11
import javax.persistence.GenerationType;
14
import javax.persistence.GenerationType;
12
import javax.persistence.Id;
15
import javax.persistence.Id;
13
import javax.persistence.Table;
16
import javax.persistence.Table;
14
 
17
 
-
 
18
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
15
import com.spice.profitmandi.dao.enumuration.cs.EscalationType;
19
import com.spice.profitmandi.dao.enumuration.cs.EscalationType;
16
 
20
 
17
/**
21
/**
18
 * @author govind
22
 * @author govind
19
 *
23
 *
Line 31... Line 35...
31
	private int authUserId;
35
	private int authUserId;
32
	
36
	
33
	@Column(name="category_id")
37
	@Column(name="category_id")
34
	private int categoryId;
38
	private int categoryId;
35
	
39
	
-
 
40
	@Column(name="region_id")
-
 
41
	private int regionId;
-
 
42
	
36
	@Column(name="escalation_type")
43
	@Column(name="escalation_type")
37
	@Enumerated(EnumType.STRING)
44
	@Enumerated(EnumType.STRING)
38
	private EscalationType escalationType;
45
	private EscalationType escalationType;
-
 
46
	
-
 
47
	@Convert(converter = LocalDateTimeAttributeConverter.class)
-
 
48
	@Column(name = "create_timestamp")
-
 
49
	private LocalDateTime createTimestamp;
39
 
50
 
40
	public int getId() {
51
	public int getId() {
41
		return id;
52
		return id;
42
	}
53
	}
43
 
54
 
Line 67... Line 78...
67
 
78
 
68
	public void setEscalationType(EscalationType escalationType) {
79
	public void setEscalationType(EscalationType escalationType) {
69
		this.escalationType = escalationType;
80
		this.escalationType = escalationType;
70
	}
81
	}
71
 
82
 
-
 
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
 
72
	@Override
99
	@Override
73
	public int hashCode() {
100
	public int hashCode() {
74
		final int prime = 31;
101
		final int prime = 31;
75
		int result = 1;
102
		int result = 1;
76
		result = prime * result + authUserId;
103
		result = prime * result + authUserId;
77
		result = prime * result + categoryId;
104
		result = prime * result + categoryId;
-
 
105
		result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
78
		result = prime * result + ((escalationType == null) ? 0 : escalationType.hashCode());
106
		result = prime * result + ((escalationType == null) ? 0 : escalationType.hashCode());
79
		result = prime * result + id;
107
		result = prime * result + id;
-
 
108
		result = prime * result + regionId;
80
		return result;
109
		return result;
81
	}
110
	}
82
 
111
 
83
	@Override
112
	@Override
84
	public boolean equals(Object obj) {
113
	public boolean equals(Object obj) {
Line 91... Line 120...
91
		Position other = (Position) obj;
120
		Position other = (Position) obj;
92
		if (authUserId != other.authUserId)
121
		if (authUserId != other.authUserId)
93
			return false;
122
			return false;
94
		if (categoryId != other.categoryId)
123
		if (categoryId != other.categoryId)
95
			return false;
124
			return false;
-
 
125
		if (createTimestamp == null) {
-
 
126
			if (other.createTimestamp != null)
-
 
127
				return false;
-
 
128
		} else if (!createTimestamp.equals(other.createTimestamp))
-
 
129
			return false;
96
		if (escalationType != other.escalationType)
130
		if (escalationType != other.escalationType)
97
			return false;
131
			return false;
98
		if (id != other.id)
132
		if (id != other.id)
99
			return false;
133
			return false;
-
 
134
		if (regionId != other.regionId)
-
 
135
			return false;
100
		return true;
136
		return true;
101
	}
137
	}
102
 
138
 
103
	@Override
139
	@Override
104
	public String toString() {
140
	public String toString() {
105
		return "Position [id=" + id + ", authUserId=" + authUserId + ", categoryId=" + categoryId + ", escalationType="
141
		return "Position [id=" + id + ", authUserId=" + authUserId + ", categoryId=" + categoryId + ", regionId="
106
				+ escalationType + "]";
142
				+ regionId + ", escalationType=" + escalationType + ", createTimestamp=" + createTimestamp + "]";
107
	}
143
	}
108
	
144
	
109
	
145
	
110
 
146
 
111
}
147
}