Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
29707 tejbeer 1
package com.spice.profitmandi.dao.model;
2
 
3
public class SamsungUpgradeOfferModel {
4
 
5
	private String brand;
6
	private long amount;
7
	private String yearMonth;
8
 
9
	public SamsungUpgradeOfferModel(String brand, long amount, String yearMonth) {
10
		super();
11
		this.brand = brand;
12
		this.amount = amount;
13
		this.yearMonth = yearMonth;
14
	}
15
 
16
	public String getBrand() {
17
		return brand;
18
	}
19
 
20
	public void setBrand(String brand) {
21
		this.brand = brand;
22
	}
23
 
24
	public long getAmount() {
25
		return amount;
26
	}
27
 
28
	public void setAmount(long amount) {
29
		this.amount = amount;
30
	}
31
 
32
	public String getYearMonth() {
33
		return yearMonth;
34
	}
35
 
36
	public void setYearMonth(String yearMonth) {
37
		this.yearMonth = yearMonth;
38
	}
39
 
40
	@Override
41
	public int hashCode() {
42
		final int prime = 31;
43
		int result = 1;
44
		result = prime * result + (int) (amount ^ (amount >>> 32));
45
		result = prime * result + ((brand == null) ? 0 : brand.hashCode());
46
		result = prime * result + ((yearMonth == null) ? 0 : yearMonth.hashCode());
47
		return result;
48
	}
49
 
50
	@Override
51
	public boolean equals(Object obj) {
52
		if (this == obj)
53
			return true;
54
		if (obj == null)
55
			return false;
56
		if (getClass() != obj.getClass())
57
			return false;
58
		SamsungUpgradeOfferModel other = (SamsungUpgradeOfferModel) obj;
59
		if (amount != other.amount)
60
			return false;
61
		if (brand == null) {
62
			if (other.brand != null)
63
				return false;
64
		} else if (!brand.equals(other.brand))
65
			return false;
66
		if (yearMonth == null) {
67
			if (other.yearMonth != null)
68
				return false;
69
		} else if (!yearMonth.equals(other.yearMonth))
70
			return false;
71
		return true;
72
	}
73
 
74
	@Override
75
	public String toString() {
76
		return "SamsungUpgradeOfferModel [brand=" + brand + ", amount=" + amount + ", yearMonth=" + yearMonth + "]";
77
	}
78
 
79
}