Subversion Repositories SmartDukaan

Rev

Rev 28451 | Details | Compare with Previous | 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;
36972 ranu 7
	private int fofoId;
28451 tejbeer 8
 
9
	public BrandWiseModel(String brand, String yearMonth, long amount) {
10
		super();
11
		this.brand = brand;
12
		this.yearMonth = yearMonth;
13
		this.amount = amount;
14
	}
15
 
36972 ranu 16
	public BrandWiseModel(int fofoId, String brand, String yearMonth, long amount) {
17
		super();
18
		this.fofoId = fofoId;
19
		this.brand = brand;
20
		this.yearMonth = yearMonth;
21
		this.amount = amount;
22
	}
23
 
24
	public int getFofoId() {
25
		return fofoId;
26
	}
27
 
28
	public void setFofoId(int fofoId) {
29
		this.fofoId = fofoId;
30
	}
31
 
28451 tejbeer 32
	public String getBrand() {
33
		return brand;
34
	}
35
 
36
	public void setBrand(String brand) {
37
		this.brand = brand;
38
	}
39
 
40
	public String getYearMonth() {
41
		return yearMonth;
42
	}
43
 
44
	public void setYearMonth(String yearMonth) {
45
		this.yearMonth = yearMonth;
46
	}
47
 
48
	public long getAmount() {
49
		return amount;
50
	}
51
 
52
	public void setAmount(long amount) {
53
		this.amount = amount;
54
	}
55
 
56
	@Override
57
	public int hashCode() {
58
		final int prime = 31;
59
		int result = 1;
60
		result = prime * result + (int) (amount ^ (amount >>> 32));
61
		result = prime * result + ((brand == null) ? 0 : brand.hashCode());
62
		result = prime * result + ((yearMonth == null) ? 0 : yearMonth.hashCode());
63
		return result;
64
	}
65
 
66
	@Override
67
	public boolean equals(Object obj) {
68
		if (this == obj)
69
			return true;
70
		if (obj == null)
71
			return false;
72
		if (getClass() != obj.getClass())
73
			return false;
74
		BrandWiseModel other = (BrandWiseModel) obj;
75
		if (amount != other.amount)
76
			return false;
77
		if (brand == null) {
78
			if (other.brand != null)
79
				return false;
80
		} else if (!brand.equals(other.brand))
81
			return false;
82
		if (yearMonth == null) {
83
			if (other.yearMonth != null)
84
				return false;
85
		} else if (!yearMonth.equals(other.yearMonth))
86
			return false;
87
		return true;
88
	}
89
 
90
	@Override
91
	public String toString() {
92
		return "BrandWiseModel [brand=" + brand + ", yearMonth=" + yearMonth + ", amount=" + amount + "]";
93
	}
94
 
95
}