Subversion Repositories SmartDukaan

Rev

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