Subversion Repositories SmartDukaan

Rev

Rev 23821 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
22549 ashik.ali 1
package com.spice.profitmandi.common.model;
2
 
22579 ashik.ali 3
public class PriceModel {
22549 ashik.ali 4
	private boolean mop;
5
	private float price;
23821 amit.gupta 6
	private float purchasePrice;
24052 amit.gupta 7
	private float mrp;
23821 amit.gupta 8
 
9
 
10
	public float getPurchasePrice() {
11
		return purchasePrice;
12
	}
13
	public void setPurchasePrice(float purchasePrice) {
14
		this.purchasePrice = purchasePrice;
15
	}
22579 ashik.ali 16
	private float maxDiscountAmount;
22549 ashik.ali 17
 
18
	public boolean isMop() {
19
		return mop;
20
	}
21
	public void setMop(boolean mop) {
22
		this.mop = mop;
23
	}
24
	public float getPrice() {
25
		return price;
26
	}
27
	public void setPrice(float price) {
28
		this.price = price;
29
	}
22579 ashik.ali 30
 
31
	public float getMaxDiscountAmount() {
32
		return maxDiscountAmount;
33
	}
34
	public void setMaxDiscountAmount(float maxDiscountAmount) {
35
		this.maxDiscountAmount = maxDiscountAmount;
36
	}
24052 amit.gupta 37
 
38
 
39
	public float getMrp() {
40
		return mrp;
41
	}
42
	public void setMrp(float mrp) {
43
		this.mrp = mrp;
44
	}
22549 ashik.ali 45
	@Override
46
	public int hashCode() {
47
		final int prime = 31;
48
		int result = 1;
49
		result = prime * result + (mop ? 1231 : 1237);
50
		result = prime * result + Float.floatToIntBits(price);
51
		return result;
52
	}
53
	@Override
54
	public boolean equals(Object obj) {
55
		if (this == obj)
56
			return true;
57
		if (obj == null)
58
			return false;
59
		if (getClass() != obj.getClass())
60
			return false;
22579 ashik.ali 61
		PriceModel other = (PriceModel) obj;
22549 ashik.ali 62
		if (mop != other.mop)
63
			return false;
64
		if (Float.floatToIntBits(price) != Float.floatToIntBits(other.price))
65
			return false;
22579 ashik.ali 66
		if (Float.floatToIntBits(maxDiscountAmount) != Float.floatToIntBits(other.maxDiscountAmount))
67
			return false;
22549 ashik.ali 68
		return true;
69
	}
70
	@Override
71
	public String toString() {
24052 amit.gupta 72
		return "PriceModel [mop=" + mop + ", price=" + price + ", purchasePrice=" + purchasePrice + ", mrp=" + mrp
23821 amit.gupta 73
				+ ", maxDiscountAmount=" + maxDiscountAmount + "]";
22549 ashik.ali 74
	}
75
 
76
}