Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

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