Subversion Repositories SmartDukaan

Rev

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

Rev 24500 Rev 27124
Line 1... Line 1...
1
package com.spice.profitmandi.dao.entity.cs;
1
package com.spice.profitmandi.dao.entity.cs;
2
 
2
 
3
import java.io.Serializable;
3
import java.io.Serializable;
-
 
4
import java.time.LocalDateTime;
4
 
5
 
5
import javax.persistence.Column;
6
import javax.persistence.Column;
6
import javax.persistence.Entity;
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;
7
import javax.persistence.Id;
12
import javax.persistence.Id;
8
import javax.persistence.Table;
13
import javax.persistence.Table;
-
 
14
import javax.persistence.Transient;
-
 
15
 
-
 
16
import com.spice.profitmandi.dao.enumuration.cs.EscalationType;
9
 
17
 
10
/**
18
/**
11
 * This class basically contains api details
19
 * This class basically contains api details
12
 * 
20
 * 
13
 * @author Govind
21
 * @author Govind
Line 18... Line 26...
18
@Table(name="cs.ticket_assigned", schema = "cs")
26
@Table(name="cs.ticket_assigned", schema = "cs")
19
public class TicketAssigned implements Serializable{
27
public class TicketAssigned implements Serializable{
20
	
28
	
21
	private static final long serialVersionUID = 1L;
29
	private static final long serialVersionUID = 1L;
22
	
30
	
23
	
-
 
24
	@Id
31
	@Id
-
 
32
	@Column(name="id", unique=true, updatable=false)
-
 
33
	@GeneratedValue(strategy = GenerationType.IDENTITY)
-
 
34
	private int id;
-
 
35
	
-
 
36
	public int getId() {
-
 
37
		return id;
-
 
38
	}
-
 
39
 
-
 
40
	public void setId(int id) {
-
 
41
		this.id = id;
-
 
42
	}
-
 
43
 
-
 
44
	public int getManagerId() {
-
 
45
		return managerId;
-
 
46
	}
-
 
47
 
-
 
48
	public void setManagerId(int managerId) {
-
 
49
		this.managerId = managerId;
-
 
50
	}
-
 
51
 
-
 
52
	@Column(name="ticket_id")
-
 
53
	private int ticketId;
-
 
54
	
25
	@Column(name="assinee_id")
55
	@Column(name="assignee_id")
26
	private int assineeId;
56
	private int assineeId;
-
 
57
 
-
 
58
	@Column(name="manager_id")
-
 
59
	private int managerId;
-
 
60
	
-
 
61
	
-
 
62
	@Column(name="escalation_type")
-
 
63
	@Enumerated(EnumType.STRING)
-
 
64
	private EscalationType escalationType;
-
 
65
	
-
 
66
 
-
 
67
	public EscalationType getEscalationType() {
-
 
68
		return escalationType;
-
 
69
	}
-
 
70
 
-
 
71
	public void setEscalationType(EscalationType escalationType) {
-
 
72
		this.escalationType = escalationType;
-
 
73
	}
-
 
74
 
-
 
75
	@Column(name="create_timestamp")
-
 
76
	LocalDateTime createTimestamp;
-
 
77
	
-
 
78
	@Transient
-
 
79
	private Ticket ticket;
-
 
80
	
-
 
81
	@Column(name="assigned_by")
-
 
82
	private int assignedBy;
-
 
83
 
27
	
84
	
28
	public int getAssineeId() {
85
	public int getAssineeId() {
29
		return assineeId;
86
		return assineeId;
30
	}
87
	}
-
 
88
	
-
 
89
	 
-
 
90
 
-
 
91
	public Ticket getTicket() {
-
 
92
		return ticket;
-
 
93
	}
-
 
94
 
-
 
95
	public void setTicket(Ticket ticket) {
-
 
96
		this.ticket = ticket;
-
 
97
	}
31
 
98
 
32
	public void setAssineeId(int assineeId) {
99
	public void setAssineeId(int assineeId) {
33
		this.assineeId = assineeId;
100
		this.assineeId = assineeId;
34
	}
101
	}
35
 
102
 
Line 38... Line 105...
38
	}
105
	}
39
 
106
 
40
	public void setTicketId(int ticketId) {
107
	public void setTicketId(int ticketId) {
41
		this.ticketId = ticketId;
108
		this.ticketId = ticketId;
42
	}
109
	}
-
 
110
	
-
 
111
	
-
 
112
	public LocalDateTime getCreateTimestamp() {
-
 
113
		return createTimestamp;
-
 
114
	}
43
 
115
 
-
 
116
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
-
 
117
		this.createTimestamp = createTimestamp;
44
	@Id
118
	}
-
 
119
 
45
	@Column(name="ticket_id")
120
	public int getAssignedBy() {
46
	private int ticketId;
121
		return assignedBy;
-
 
122
	}
-
 
123
 
-
 
124
	public void setAssignedBy(int assignedBy) {
-
 
125
		this.assignedBy = assignedBy;
-
 
126
	}
47
 
127
 
48
	@Override
128
	@Override
49
	public int hashCode() {
129
	public int hashCode() {
50
		final int prime = 31;
130
		final int prime = 31;
51
		int result = 1;
131
		int result = 1;
-
 
132
		result = prime * result + assignedBy;
52
		result = prime * result + assineeId;
133
		result = prime * result + assineeId;
-
 
134
		result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
-
 
135
		result = prime * result + ((escalationType == null) ? 0 : escalationType.hashCode());
-
 
136
		result = prime * result + id;
-
 
137
		result = prime * result + managerId;
-
 
138
		result = prime * result + ((ticket == null) ? 0 : ticket.hashCode());
53
		result = prime * result + ticketId;
139
		result = prime * result + ticketId;
54
		return result;
140
		return result;
55
	}
141
	}
56
 
142
 
57
	@Override
143
	@Override
Line 61... Line 147...
61
		if (obj == null)
147
		if (obj == null)
62
			return false;
148
			return false;
63
		if (getClass() != obj.getClass())
149
		if (getClass() != obj.getClass())
64
			return false;
150
			return false;
65
		TicketAssigned other = (TicketAssigned) obj;
151
		TicketAssigned other = (TicketAssigned) obj;
-
 
152
		if (assignedBy != other.assignedBy)
-
 
153
			return false;
66
		if (assineeId != other.assineeId)
154
		if (assineeId != other.assineeId)
67
			return false;
155
			return false;
-
 
156
		if (createTimestamp == null) {
-
 
157
			if (other.createTimestamp != null)
-
 
158
				return false;
-
 
159
		} else if (!createTimestamp.equals(other.createTimestamp))
-
 
160
			return false;
-
 
161
		if (escalationType != other.escalationType)
-
 
162
			return false;
-
 
163
		if (id != other.id)
-
 
164
			return false;
-
 
165
		if (managerId != other.managerId)
-
 
166
			return false;
-
 
167
		if (ticket == null) {
-
 
168
			if (other.ticket != null)
-
 
169
				return false;
-
 
170
		} else if (!ticket.equals(other.ticket))
-
 
171
			return false;
68
		if (ticketId != other.ticketId)
172
		if (ticketId != other.ticketId)
69
			return false;
173
			return false;
70
		return true;
174
		return true;
71
	}
175
	}
72
 
176
 
73
	@Override
177
	@Override
74
	public String toString() {
178
	public String toString() {
75
		return "TicketAssigned [assineeId=" + assineeId + ", ticketId=" + ticketId + "]";
179
		return "TicketAssigned [id=" + id + ", ticketId=" + ticketId + ", assineeId=" + assineeId + ", managerId="
-
 
180
				+ managerId + ", escalationType=" + escalationType + ", createTimestamp=" + createTimestamp
-
 
181
				+ ", ticket=" + ticket + ", assignedBy=" + assignedBy + "]";
76
	}
182
	}
77
 
183
 
78
	
184
	
79
	
185
	
80
	
186