Subversion Repositories SmartDukaan

Rev

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

Rev 21924 Rev 22009
Line 2... Line 2...
2
 
2
 
3
import java.io.Serializable;
3
import java.io.Serializable;
4
import java.time.LocalDateTime;
4
import java.time.LocalDateTime;
5
 
5
 
6
import javax.persistence.Column;
6
import javax.persistence.Column;
-
 
7
import javax.persistence.Convert;
7
import javax.persistence.Entity;
8
import javax.persistence.Entity;
8
import javax.persistence.EnumType;
9
import javax.persistence.EnumType;
9
import javax.persistence.Enumerated;
10
import javax.persistence.Enumerated;
10
import javax.persistence.Id;
11
import javax.persistence.Id;
11
import javax.persistence.NamedQueries;
12
import javax.persistence.NamedQueries;
12
import javax.persistence.NamedQuery;
13
import javax.persistence.NamedQuery;
13
import javax.persistence.Table;
14
import javax.persistence.Table;
14
import javax.persistence.UniqueConstraint;
15
import javax.persistence.UniqueConstraint;
15
 
16
 
-
 
17
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
16
import com.spice.profitmandi.dao.enumuration.dtr.RetailerType;
18
import com.spice.profitmandi.dao.enumuration.dtr.RetailerType;
17
import com.spice.profitmandi.dao.enumuration.dtr.SaleValue;
19
import com.spice.profitmandi.dao.enumuration.dtr.SaleValue;
18
 
20
 
19
/**
21
/**
20
 * This class basically contains api details
22
 * This class basically contains api details
Line 88... Line 90...
88
	private boolean active;
90
	private boolean active;
89
	
91
	
90
	@Column(name = "migrated", columnDefinition = "tinyint(1) default 0")
92
	@Column(name = "migrated", columnDefinition = "tinyint(1) default 0")
91
	private boolean migrated;
93
	private boolean migrated;
92
	
94
	
-
 
95
	@Convert(converter = LocalDateTimeAttributeConverter.class)
93
	@Column(name="create_timestamp", updatable = false)
96
	@Column(name="create_timestamp", updatable = false)
94
	private LocalDateTime createTimestamp = LocalDateTime.now();
97
	private LocalDateTime createTimestamp = LocalDateTime.now();
95
	
98
	
-
 
99
	@Convert(converter = LocalDateTimeAttributeConverter.class)
96
	@Column(name="update_timestamp")
100
	@Column(name="update_timestamp")
97
	private LocalDateTime updateTimestamp = LocalDateTime.now();
101
	private LocalDateTime updateTimestamp = LocalDateTime.now();
98
		
102
		
99
	@Column(name = "document_id")
103
	@Column(name = "document_id")
100
	private int documentId;
104
	private int documentId;
Line 230... Line 234...
230
    public void setFofo(boolean fofo) {
234
    public void setFofo(boolean fofo) {
231
		this.fofo = fofo;
235
		this.fofo = fofo;
232
	}
236
	}
233
    
237
    
234
    
238
    
-
 
239
	
235
	@Override
240
	@Override
236
	public int hashCode() {
241
	public int hashCode() {
237
		final int prime = 31;
242
		final int prime = 31;
238
		int result = 1;
243
		int result = 1;
239
		result = prime * result + (accessories ? 1231 : 1237);
-
 
240
		result = prime * result + (active ? 1231 : 1237);
-
 
241
		result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
-
 
242
		result = prime * result + currentAddressId;
-
 
243
		result = prime * result + documentId;
-
 
244
		result = prime * result + (fofo ? 1231 : 1237);
-
 
245
		result = prime * result + id;
244
		result = prime * result + id;
246
		result = prime * result + (migrated ? 1231 : 1237);
-
 
247
		result = prime * result + (mobile ? 1231 : 1237);
-
 
248
		result = prime * result + ((monthlySaleValue == null) ? 0 : monthlySaleValue.hashCode());
-
 
249
		result = prime * result + ((name == null) ? 0 : name.hashCode());
-
 
250
		result = prime * result + ((number == null) ? 0 : number.hashCode());
-
 
251
		result = prime * result + ((other1 == null) ? 0 : other1.hashCode());
-
 
252
		result = prime * result + ((other2 == null) ? 0 : other2.hashCode());
-
 
253
		result = prime * result + (recharge ? 1231 : 1237);
-
 
254
		result = prime * result + (selfPickup ? 1231 : 1237);
-
 
255
		result = prime * result + ((smartphoneSaleValue == null) ? 0 : smartphoneSaleValue.hashCode());
-
 
256
		result = prime * result + ((type == null) ? 0 : type.hashCode());
-
 
257
		result = prime * result + ((updateTimestamp == null) ? 0 : updateTimestamp.hashCode());
-
 
258
		return result;
245
		return result;
259
	}
246
	}
260
	@Override
247
	@Override
261
	public boolean equals(Object obj) {
248
	public boolean equals(Object obj) {
262
		if (this == obj)
249
		if (this == obj)
Line 264... Line 251...
264
		if (obj == null)
251
		if (obj == null)
265
			return false;
252
			return false;
266
		if (getClass() != obj.getClass())
253
		if (getClass() != obj.getClass())
267
			return false;
254
			return false;
268
		Retailer other = (Retailer) obj;
255
		Retailer other = (Retailer) obj;
269
		if (accessories != other.accessories)
-
 
270
			return false;
-
 
271
		if (active != other.active)
-
 
272
			return false;
-
 
273
		if (createTimestamp == null) {
-
 
274
			if (other.createTimestamp != null)
-
 
275
				return false;
-
 
276
		} else if (!createTimestamp.equals(other.createTimestamp))
-
 
277
			return false;
-
 
278
		if (currentAddressId != other.currentAddressId)
-
 
279
			return false;
-
 
280
		if (documentId != other.documentId)
-
 
281
			return false;
-
 
282
		if (fofo != other.fofo)
-
 
283
			return false;
-
 
284
		if (id != other.id)
256
		if (id != other.id)
285
			return false;
257
			return false;
286
		if (migrated != other.migrated)
-
 
287
			return false;
-
 
288
		if (mobile != other.mobile)
-
 
289
			return false;
-
 
290
		if (monthlySaleValue != other.monthlySaleValue)
-
 
291
			return false;
-
 
292
		if (name == null) {
-
 
293
			if (other.name != null)
-
 
294
				return false;
-
 
295
		} else if (!name.equals(other.name))
-
 
296
			return false;
-
 
297
		if (number == null) {
-
 
298
			if (other.number != null)
-
 
299
				return false;
-
 
300
		} else if (!number.equals(other.number))
-
 
301
			return false;
-
 
302
		if (other1 == null) {
-
 
303
			if (other.other1 != null)
-
 
304
				return false;
-
 
305
		} else if (!other1.equals(other.other1))
-
 
306
			return false;
-
 
307
		if (other2 == null) {
-
 
308
			if (other.other2 != null)
-
 
309
				return false;
-
 
310
		} else if (!other2.equals(other.other2))
-
 
311
			return false;
-
 
312
		if (recharge != other.recharge)
-
 
313
			return false;
-
 
314
		if (selfPickup != other.selfPickup)
-
 
315
			return false;
-
 
316
		if (smartphoneSaleValue != other.smartphoneSaleValue)
-
 
317
			return false;
-
 
318
		if (type != other.type)
-
 
319
			return false;
-
 
320
		if (updateTimestamp == null) {
-
 
321
			if (other.updateTimestamp != null)
-
 
322
				return false;
-
 
323
		} else if (!updateTimestamp.equals(other.updateTimestamp))
-
 
324
			return false;
-
 
325
		return true;
258
		return true;
326
	}
259
	}
327
	@Override
260
	@Override
328
	public String toString() {
261
	public String toString() {
329
		return "Retailer [id=" + id + ", name=" + name + ", number=" + number + ", type=" + type + ", monthlySaleValue="
262
		return "Retailer [id=" + id + ", name=" + name + ", number=" + number + ", type=" + type + ", monthlySaleValue="