| 28371 |
amit.gupta |
1 |
package com.spice.profitmandi.dao.entity.dtr;
|
|
|
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.GeneratedValue;
|
|
|
9 |
import javax.persistence.GenerationType;
|
|
|
10 |
import javax.persistence.Id;
|
|
|
11 |
import javax.persistence.Table;
|
|
|
12 |
|
|
|
13 |
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
14 |
|
|
|
15 |
/**
|
|
|
16 |
* This class basically contains api details
|
|
|
17 |
*
|
|
|
18 |
* @author ashikali
|
|
|
19 |
*
|
|
|
20 |
*/
|
|
|
21 |
@Entity
|
|
|
22 |
@Table(name="dtr.web_offer", schema = "dtr")
|
|
|
23 |
public class WebOffer implements Serializable{
|
|
|
24 |
|
|
|
25 |
private static final long serialVersionUID = 1L;
|
|
|
26 |
@Id
|
|
|
27 |
@Column(name="id", columnDefinition = "int(10) unsigned")
|
|
|
28 |
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
29 |
private int id;
|
|
|
30 |
|
|
|
31 |
@Column
|
|
|
32 |
private String title;
|
|
|
33 |
|
|
|
34 |
@Column
|
|
|
35 |
private String smallText;
|
|
|
36 |
|
|
|
37 |
@Column
|
|
|
38 |
private String detailedText;
|
|
|
39 |
|
|
|
40 |
@Column
|
|
|
41 |
private int rank;
|
|
|
42 |
|
|
|
43 |
@Column
|
|
|
44 |
private String smallBannerUrl;
|
|
|
45 |
|
|
|
46 |
@Column
|
|
|
47 |
private String largeBannerUrl;
|
|
|
48 |
|
|
|
49 |
@Column
|
|
|
50 |
private boolean active=true;
|
|
|
51 |
|
|
|
52 |
@Column
|
|
|
53 |
private LocalDateTime startDate;
|
|
|
54 |
|
|
|
55 |
@Column
|
|
|
56 |
private LocalDateTime endDate;
|
|
|
57 |
|
|
|
58 |
@Column
|
|
|
59 |
private LocalDateTime createdDate;
|
|
|
60 |
|
|
|
61 |
@Override
|
|
|
62 |
public String toString() {
|
|
|
63 |
return "WebOffer [id=" + id + ", title=" + title + ", smallText=" + smallText + ", detailedText=" + detailedText
|
|
|
64 |
+ ", rank=" + rank + ", smallBannerUrl=" + smallBannerUrl + ", largeBannerUrl=" + largeBannerUrl
|
|
|
65 |
+ ", active=" + active + ", startDate=" + startDate + ", endDate=" + endDate + ", createdDate="
|
|
|
66 |
+ createdDate + "]";
|
|
|
67 |
}
|
|
|
68 |
|
|
|
69 |
public int getId() {
|
|
|
70 |
return id;
|
|
|
71 |
}
|
|
|
72 |
|
|
|
73 |
public void setId(int id) {
|
|
|
74 |
this.id = id;
|
|
|
75 |
}
|
|
|
76 |
|
|
|
77 |
public String getTitle() {
|
|
|
78 |
return title;
|
|
|
79 |
}
|
|
|
80 |
|
|
|
81 |
public void setTitle(String title) {
|
|
|
82 |
this.title = title;
|
|
|
83 |
}
|
|
|
84 |
|
|
|
85 |
public String getSmallText() {
|
|
|
86 |
return smallText;
|
|
|
87 |
}
|
|
|
88 |
|
|
|
89 |
public void setSmallText(String smallText) {
|
|
|
90 |
this.smallText = smallText;
|
|
|
91 |
}
|
|
|
92 |
|
|
|
93 |
public String getDetailedText() {
|
|
|
94 |
return detailedText;
|
|
|
95 |
}
|
|
|
96 |
|
|
|
97 |
public void setDetailedText(String detailedText) {
|
|
|
98 |
this.detailedText = detailedText;
|
|
|
99 |
}
|
|
|
100 |
|
|
|
101 |
public int getRank() {
|
|
|
102 |
return rank;
|
|
|
103 |
}
|
|
|
104 |
|
|
|
105 |
public void setRank(int rank) {
|
|
|
106 |
this.rank = rank;
|
|
|
107 |
}
|
|
|
108 |
|
|
|
109 |
public String getSmallBannerUrl() {
|
|
|
110 |
return smallBannerUrl;
|
|
|
111 |
}
|
|
|
112 |
|
|
|
113 |
public void setSmallBannerUrl(String smallBannerUrl) {
|
|
|
114 |
this.smallBannerUrl = smallBannerUrl;
|
|
|
115 |
}
|
|
|
116 |
|
|
|
117 |
public String getLargeBannerUrl() {
|
|
|
118 |
return largeBannerUrl;
|
|
|
119 |
}
|
|
|
120 |
|
|
|
121 |
public void setLargeBannerUrl(String largeBannerUrl) {
|
|
|
122 |
this.largeBannerUrl = largeBannerUrl;
|
|
|
123 |
}
|
|
|
124 |
|
|
|
125 |
public boolean isActive() {
|
|
|
126 |
return active;
|
|
|
127 |
}
|
|
|
128 |
|
|
|
129 |
public void setActive(boolean active) {
|
|
|
130 |
this.active = active;
|
|
|
131 |
}
|
|
|
132 |
|
|
|
133 |
public LocalDateTime getStartDate() {
|
|
|
134 |
return startDate;
|
|
|
135 |
}
|
|
|
136 |
|
|
|
137 |
public void setStartDate(LocalDateTime startDate) {
|
|
|
138 |
this.startDate = startDate;
|
|
|
139 |
}
|
|
|
140 |
|
|
|
141 |
public LocalDateTime getEndDate() {
|
|
|
142 |
return endDate;
|
|
|
143 |
}
|
|
|
144 |
|
|
|
145 |
public void setEndDate(LocalDateTime endDate) {
|
|
|
146 |
this.endDate = endDate;
|
|
|
147 |
}
|
|
|
148 |
|
|
|
149 |
public LocalDateTime getCreatedDate() {
|
|
|
150 |
return createdDate;
|
|
|
151 |
}
|
|
|
152 |
|
|
|
153 |
public void setCreatedDate(LocalDateTime createdDate) {
|
|
|
154 |
this.createdDate = createdDate;
|
|
|
155 |
}
|
|
|
156 |
|
|
|
157 |
public static long getSerialversionuid() {
|
|
|
158 |
return serialVersionUID;
|
|
|
159 |
}
|
|
|
160 |
|
|
|
161 |
@Override
|
|
|
162 |
public int hashCode() {
|
|
|
163 |
final int prime = 31;
|
|
|
164 |
int result = 1;
|
|
|
165 |
result = prime * result + (active ? 1231 : 1237);
|
|
|
166 |
result = prime * result + ((createdDate == null) ? 0 : createdDate.hashCode());
|
|
|
167 |
result = prime * result + ((detailedText == null) ? 0 : detailedText.hashCode());
|
|
|
168 |
result = prime * result + ((endDate == null) ? 0 : endDate.hashCode());
|
|
|
169 |
result = prime * result + id;
|
|
|
170 |
result = prime * result + ((largeBannerUrl == null) ? 0 : largeBannerUrl.hashCode());
|
|
|
171 |
result = prime * result + rank;
|
|
|
172 |
result = prime * result + ((smallBannerUrl == null) ? 0 : smallBannerUrl.hashCode());
|
|
|
173 |
result = prime * result + ((smallText == null) ? 0 : smallText.hashCode());
|
|
|
174 |
result = prime * result + ((startDate == null) ? 0 : startDate.hashCode());
|
|
|
175 |
result = prime * result + ((title == null) ? 0 : title.hashCode());
|
|
|
176 |
return result;
|
|
|
177 |
}
|
|
|
178 |
|
|
|
179 |
@Override
|
|
|
180 |
public boolean equals(Object obj) {
|
|
|
181 |
if (this == obj)
|
|
|
182 |
return true;
|
|
|
183 |
if (obj == null)
|
|
|
184 |
return false;
|
|
|
185 |
if (getClass() != obj.getClass())
|
|
|
186 |
return false;
|
|
|
187 |
WebOffer other = (WebOffer) obj;
|
|
|
188 |
if (active != other.active)
|
|
|
189 |
return false;
|
|
|
190 |
if (createdDate == null) {
|
|
|
191 |
if (other.createdDate != null)
|
|
|
192 |
return false;
|
|
|
193 |
} else if (!createdDate.equals(other.createdDate))
|
|
|
194 |
return false;
|
|
|
195 |
if (detailedText == null) {
|
|
|
196 |
if (other.detailedText != null)
|
|
|
197 |
return false;
|
|
|
198 |
} else if (!detailedText.equals(other.detailedText))
|
|
|
199 |
return false;
|
|
|
200 |
if (endDate == null) {
|
|
|
201 |
if (other.endDate != null)
|
|
|
202 |
return false;
|
|
|
203 |
} else if (!endDate.equals(other.endDate))
|
|
|
204 |
return false;
|
|
|
205 |
if (id != other.id)
|
|
|
206 |
return false;
|
|
|
207 |
if (largeBannerUrl == null) {
|
|
|
208 |
if (other.largeBannerUrl != null)
|
|
|
209 |
return false;
|
|
|
210 |
} else if (!largeBannerUrl.equals(other.largeBannerUrl))
|
|
|
211 |
return false;
|
|
|
212 |
if (rank != other.rank)
|
|
|
213 |
return false;
|
|
|
214 |
if (smallBannerUrl == null) {
|
|
|
215 |
if (other.smallBannerUrl != null)
|
|
|
216 |
return false;
|
|
|
217 |
} else if (!smallBannerUrl.equals(other.smallBannerUrl))
|
|
|
218 |
return false;
|
|
|
219 |
if (smallText == null) {
|
|
|
220 |
if (other.smallText != null)
|
|
|
221 |
return false;
|
|
|
222 |
} else if (!smallText.equals(other.smallText))
|
|
|
223 |
return false;
|
|
|
224 |
if (startDate == null) {
|
|
|
225 |
if (other.startDate != null)
|
|
|
226 |
return false;
|
|
|
227 |
} else if (!startDate.equals(other.startDate))
|
|
|
228 |
return false;
|
|
|
229 |
if (title == null) {
|
|
|
230 |
if (other.title != null)
|
|
|
231 |
return false;
|
|
|
232 |
} else if (!title.equals(other.title))
|
|
|
233 |
return false;
|
|
|
234 |
return true;
|
|
|
235 |
}
|
|
|
236 |
|
|
|
237 |
|
|
|
238 |
|
|
|
239 |
|
|
|
240 |
}
|