Subversion Repositories SmartDukaan

Rev

Rev 24500 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
24500 govind 1
package com.spice.profitmandi.dao.entity.cs;
2
 
3
import java.io.Serializable;
27124 amit.gupta 4
import java.time.LocalDateTime;
24500 govind 5
 
6
import javax.persistence.Column;
7
import javax.persistence.Entity;
27124 amit.gupta 8
import javax.persistence.EnumType;
9
import javax.persistence.Enumerated;
10
import javax.persistence.GeneratedValue;
11
import javax.persistence.GenerationType;
24500 govind 12
import javax.persistence.Id;
13
import javax.persistence.Table;
27124 amit.gupta 14
import javax.persistence.Transient;
24500 govind 15
 
27124 amit.gupta 16
import com.spice.profitmandi.dao.enumuration.cs.EscalationType;
17
 
24500 govind 18
/**
19
 * This class basically contains api details
20
 * 
21
 * @author Govind
22
 *
23
 */
24
 
25
@Entity
26
@Table(name="cs.ticket_assigned", schema = "cs")
27
public class TicketAssigned implements Serializable{
28
 
29
	private static final long serialVersionUID = 1L;
30
 
27124 amit.gupta 31
	@Id
32
	@Column(name="id", unique=true, updatable=false)
33
	@GeneratedValue(strategy = GenerationType.IDENTITY)
34
	private int id;
24500 govind 35
 
27124 amit.gupta 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
 
55
	@Column(name="assignee_id")
24500 govind 56
	private int assineeId;
27124 amit.gupta 57
 
58
	@Column(name="manager_id")
59
	private int managerId;
24500 govind 60
 
27124 amit.gupta 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
 
84
 
24500 govind 85
	public int getAssineeId() {
86
		return assineeId;
87
	}
27124 amit.gupta 88
 
89
 
24500 govind 90
 
27124 amit.gupta 91
	public Ticket getTicket() {
92
		return ticket;
93
	}
94
 
95
	public void setTicket(Ticket ticket) {
96
		this.ticket = ticket;
97
	}
98
 
24500 govind 99
	public void setAssineeId(int assineeId) {
100
		this.assineeId = assineeId;
101
	}
102
 
103
	public int getTicketId() {
104
		return ticketId;
105
	}
106
 
107
	public void setTicketId(int ticketId) {
108
		this.ticketId = ticketId;
109
	}
27124 amit.gupta 110
 
111
 
112
	public LocalDateTime getCreateTimestamp() {
113
		return createTimestamp;
114
	}
24500 govind 115
 
27124 amit.gupta 116
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
117
		this.createTimestamp = createTimestamp;
118
	}
24500 govind 119
 
27124 amit.gupta 120
	public int getAssignedBy() {
121
		return assignedBy;
122
	}
123
 
124
	public void setAssignedBy(int assignedBy) {
125
		this.assignedBy = assignedBy;
126
	}
127
 
24500 govind 128
	@Override
129
	public int hashCode() {
130
		final int prime = 31;
131
		int result = 1;
27124 amit.gupta 132
		result = prime * result + assignedBy;
24500 govind 133
		result = prime * result + assineeId;
27124 amit.gupta 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());
24500 govind 139
		result = prime * result + ticketId;
140
		return result;
141
	}
142
 
143
	@Override
144
	public boolean equals(Object obj) {
145
		if (this == obj)
146
			return true;
147
		if (obj == null)
148
			return false;
149
		if (getClass() != obj.getClass())
150
			return false;
151
		TicketAssigned other = (TicketAssigned) obj;
27124 amit.gupta 152
		if (assignedBy != other.assignedBy)
153
			return false;
24500 govind 154
		if (assineeId != other.assineeId)
155
			return false;
27124 amit.gupta 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;
24500 govind 172
		if (ticketId != other.ticketId)
173
			return false;
174
		return true;
175
	}
176
 
177
	@Override
178
	public String toString() {
27124 amit.gupta 179
		return "TicketAssigned [id=" + id + ", ticketId=" + ticketId + ", assineeId=" + assineeId + ", managerId="
180
				+ managerId + ", escalationType=" + escalationType + ", createTimestamp=" + createTimestamp
181
				+ ", ticket=" + ticket + ", assignedBy=" + assignedBy + "]";
24500 govind 182
	}
183
 
184
 
185
 
186
 
187
 
188
}