Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

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