Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
24383 amit.gupta 1
package com.spice.profitmandi.dao.entity.cs;
2
 
3
import java.io.Serializable;
4
import java.time.LocalDateTime;
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;
24573 amit.gupta 14
import javax.persistence.Transient;
24383 amit.gupta 15
 
16
import com.spice.profitmandi.dao.entity.fofo.ActivityType;
17
 
18
 
19
/**
20
 * This class basically contains api details
21
 * 
22
 * @author amit
23
 *
24
 */
25
 
26
@Entity
27
@Table(name="cs.activity", schema = "cs")
28
public class Activity implements Serializable{
29
 
30
	private static final long serialVersionUID = 1L;
31
 
32
	@Id
33
	@Column(name="id", unique=true, updatable=false)
34
	@GeneratedValue(strategy = GenerationType.IDENTITY)
35
	private int id;
36
 
37
	@Column(name="ticket_id")
38
	private int ticketId;
39
 
40
 
41
	@Column
42
	@Enumerated(EnumType.STRING)
43
	private ActivityType type;
44
 
24388 amit.gupta 45
	@Column(name="created_by")
24383 amit.gupta 46
	private int createdBy;
47
 
24388 amit.gupta 48
	@Column(name="create_timestamp")
24383 amit.gupta 49
	private LocalDateTime createTimestamp;
50
 
51
	@Column
52
	private String message;
53
 
24573 amit.gupta 54
	@Transient 
55
	private String name;
24383 amit.gupta 56
 
57
 
24573 amit.gupta 58
	public String getName() {
59
		return name;
60
	}
61
 
62
 
63
 
64
	public void setName(String name) {
65
		this.name = name;
66
	}
67
 
68
 
69
 
24383 amit.gupta 70
	@Override
71
	public int hashCode() {
72
		final int prime = 31;
73
		int result = 1;
24573 amit.gupta 74
		result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
24383 amit.gupta 75
		result = prime * result + createdBy;
76
		result = prime * result + id;
77
		result = prime * result + ((message == null) ? 0 : message.hashCode());
24573 amit.gupta 78
		result = prime * result + ((name == null) ? 0 : name.hashCode());
24383 amit.gupta 79
		result = prime * result + ticketId;
80
		result = prime * result + ((type == null) ? 0 : type.hashCode());
81
		return result;
82
	}
83
 
84
 
85
 
86
	@Override
87
	public boolean equals(Object obj) {
88
		if (this == obj)
89
			return true;
90
		if (obj == null)
91
			return false;
92
		if (getClass() != obj.getClass())
93
			return false;
94
		Activity other = (Activity) obj;
24573 amit.gupta 95
		if (createTimestamp == null) {
96
			if (other.createTimestamp != null)
97
				return false;
98
		} else if (!createTimestamp.equals(other.createTimestamp))
99
			return false;
24383 amit.gupta 100
		if (createdBy != other.createdBy)
101
			return false;
102
		if (id != other.id)
103
			return false;
104
		if (message == null) {
105
			if (other.message != null)
106
				return false;
107
		} else if (!message.equals(other.message))
108
			return false;
24573 amit.gupta 109
		if (name == null) {
110
			if (other.name != null)
111
				return false;
112
		} else if (!name.equals(other.name))
113
			return false;
24383 amit.gupta 114
		if (ticketId != other.ticketId)
115
			return false;
116
		if (type != other.type)
117
			return false;
118
		return true;
119
	}
120
 
121
 
122
 
123
 
124
 
125
	public int getTicketId() {
126
		return ticketId;
127
	}
128
 
129
 
130
 
131
	public void setTicketId(int ticketId) {
132
		this.ticketId = ticketId;
133
	}
134
 
135
 
136
 
137
	public int getId() {
138
		return id;
139
	}
140
 
141
 
142
 
143
	public void setId(int id) {
144
		this.id = id;
145
	}
146
 
147
 
148
 
149
	public ActivityType getType() {
150
		return type;
151
	}
152
 
153
 
154
 
155
	public void setType(ActivityType type) {
156
		this.type = type;
157
	}
158
 
159
 
160
 
161
	public int getCreatedBy() {
162
		return createdBy;
163
	}
164
 
165
 
166
 
167
	public void setCreatedBy(int createdBy) {
168
		this.createdBy = createdBy;
169
	}
170
 
171
 
172
 
173
	public String getMessage() {
174
		return message;
175
	}
176
 
177
 
178
 
179
	public void setMessage(String message) {
180
		this.message = message;
181
	}
182
 
183
 
184
 
24417 govind 185
	public LocalDateTime getCreateTimestamp() {
186
		return createTimestamp;
187
	}
188
 
189
 
190
 
191
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
192
		this.createTimestamp = createTimestamp;
193
	}
194
 
195
 
196
 
24383 amit.gupta 197
	@Override
198
	public String toString() {
199
		return "Activity [id=" + id + ", ticketId=" + ticketId + ", type=" + type + ", createdBy=" + createdBy
24573 amit.gupta 200
				+ ", createTimestamp=" + createTimestamp + ", message=" + message + ", name=" + name + "]";
24383 amit.gupta 201
	}
202
 
203
 
204
}