Subversion Repositories SmartDukaan

Rev

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

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