| 30416 |
tejbeer |
1 |
package com.spice.profitmandi.dao.model;
|
|
|
2 |
|
|
|
3 |
import java.time.LocalDateTime;
|
|
|
4 |
|
|
|
5 |
public class TicketViewModel {
|
|
|
6 |
|
|
|
7 |
private int id;
|
|
|
8 |
private String categoryName;
|
|
|
9 |
private String subCategoryName;
|
|
|
10 |
private LocalDateTime createdTimestamp;
|
|
|
11 |
|
|
|
12 |
public TicketViewModel(int id, String categoryName, String subCategoryName, LocalDateTime createdTimestamp) {
|
|
|
13 |
super();
|
|
|
14 |
this.id = id;
|
|
|
15 |
this.categoryName = categoryName;
|
|
|
16 |
this.subCategoryName = subCategoryName;
|
|
|
17 |
this.createdTimestamp = createdTimestamp;
|
|
|
18 |
}
|
|
|
19 |
|
|
|
20 |
public TicketViewModel() {
|
|
|
21 |
super();
|
|
|
22 |
// TODO Auto-generated constructor stub
|
|
|
23 |
}
|
|
|
24 |
|
|
|
25 |
public int getId() {
|
|
|
26 |
return id;
|
|
|
27 |
}
|
|
|
28 |
|
|
|
29 |
public void setId(int id) {
|
|
|
30 |
this.id = id;
|
|
|
31 |
}
|
|
|
32 |
|
|
|
33 |
public String getCategoryName() {
|
|
|
34 |
return categoryName;
|
|
|
35 |
}
|
|
|
36 |
|
|
|
37 |
public void setCategoryName(String categoryName) {
|
|
|
38 |
this.categoryName = categoryName;
|
|
|
39 |
}
|
|
|
40 |
|
|
|
41 |
public String getSubCategoryName() {
|
|
|
42 |
return subCategoryName;
|
|
|
43 |
}
|
|
|
44 |
|
|
|
45 |
public void setSubCategoryName(String subCategoryName) {
|
|
|
46 |
this.subCategoryName = subCategoryName;
|
|
|
47 |
}
|
|
|
48 |
|
|
|
49 |
public LocalDateTime getCreatedTimestamp() {
|
|
|
50 |
return createdTimestamp;
|
|
|
51 |
}
|
|
|
52 |
|
|
|
53 |
public void setCreatedTimestamp(LocalDateTime createdTimestamp) {
|
|
|
54 |
this.createdTimestamp = createdTimestamp;
|
|
|
55 |
}
|
|
|
56 |
|
|
|
57 |
@Override
|
|
|
58 |
public int hashCode() {
|
|
|
59 |
final int prime = 31;
|
|
|
60 |
int result = 1;
|
|
|
61 |
result = prime * result + ((categoryName == null) ? 0 : categoryName.hashCode());
|
|
|
62 |
result = prime * result + ((createdTimestamp == null) ? 0 : createdTimestamp.hashCode());
|
|
|
63 |
result = prime * result + id;
|
|
|
64 |
result = prime * result + ((subCategoryName == null) ? 0 : subCategoryName.hashCode());
|
|
|
65 |
return result;
|
|
|
66 |
}
|
|
|
67 |
|
|
|
68 |
@Override
|
|
|
69 |
public boolean equals(Object obj) {
|
|
|
70 |
if (this == obj)
|
|
|
71 |
return true;
|
|
|
72 |
if (obj == null)
|
|
|
73 |
return false;
|
|
|
74 |
if (getClass() != obj.getClass())
|
|
|
75 |
return false;
|
|
|
76 |
TicketViewModel other = (TicketViewModel) obj;
|
|
|
77 |
if (categoryName == null) {
|
|
|
78 |
if (other.categoryName != null)
|
|
|
79 |
return false;
|
|
|
80 |
} else if (!categoryName.equals(other.categoryName))
|
|
|
81 |
return false;
|
|
|
82 |
if (createdTimestamp == null) {
|
|
|
83 |
if (other.createdTimestamp != null)
|
|
|
84 |
return false;
|
|
|
85 |
} else if (!createdTimestamp.equals(other.createdTimestamp))
|
|
|
86 |
return false;
|
|
|
87 |
if (id != other.id)
|
|
|
88 |
return false;
|
|
|
89 |
if (subCategoryName == null) {
|
|
|
90 |
if (other.subCategoryName != null)
|
|
|
91 |
return false;
|
|
|
92 |
} else if (!subCategoryName.equals(other.subCategoryName))
|
|
|
93 |
return false;
|
|
|
94 |
return true;
|
|
|
95 |
}
|
|
|
96 |
|
|
|
97 |
@Override
|
|
|
98 |
public String toString() {
|
|
|
99 |
return "TicketViewModel [id=" + id + ", categoryName=" + categoryName + ", subCategoryName=" + subCategoryName
|
|
|
100 |
+ ", createdTimestamp=" + createdTimestamp + "]";
|
|
|
101 |
}
|
|
|
102 |
|
|
|
103 |
}
|