Subversion Repositories SmartDukaan

Rev

Rev 22579 | Go to most recent revision | 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;
7
 
8
 
9
	public float getPurchasePrice() {
10
		return purchasePrice;
11
	}
12
	public void setPurchasePrice(float purchasePrice) {
13
		this.purchasePrice = purchasePrice;
14
	}
22579 ashik.ali 15
	private float maxDiscountAmount;
22549 ashik.ali 16
 
17
	public boolean isMop() {
18
		return mop;
19
	}
20
	public void setMop(boolean mop) {
21
		this.mop = mop;
22
	}
23
	public float getPrice() {
24
		return price;
25
	}
26
	public void setPrice(float price) {
27
		this.price = price;
28
	}
22579 ashik.ali 29
 
30
	public float getMaxDiscountAmount() {
31
		return maxDiscountAmount;
32
	}
33
	public void setMaxDiscountAmount(float maxDiscountAmount) {
34
		this.maxDiscountAmount = maxDiscountAmount;
35
	}
22549 ashik.ali 36
	@Override
37
	public int hashCode() {
38
		final int prime = 31;
39
		int result = 1;
40
		result = prime * result + (mop ? 1231 : 1237);
41
		result = prime * result + Float.floatToIntBits(price);
42
		return result;
43
	}
44
	@Override
45
	public boolean equals(Object obj) {
46
		if (this == obj)
47
			return true;
48
		if (obj == null)
49
			return false;
50
		if (getClass() != obj.getClass())
51
			return false;
22579 ashik.ali 52
		PriceModel other = (PriceModel) obj;
22549 ashik.ali 53
		if (mop != other.mop)
54
			return false;
55
		if (Float.floatToIntBits(price) != Float.floatToIntBits(other.price))
56
			return false;
22579 ashik.ali 57
		if (Float.floatToIntBits(maxDiscountAmount) != Float.floatToIntBits(other.maxDiscountAmount))
58
			return false;
22549 ashik.ali 59
		return true;
60
	}
61
	@Override
62
	public String toString() {
23821 amit.gupta 63
		return "PriceModel [mop=" + mop + ", price=" + price + ", purchasePrice=" + purchasePrice
64
				+ ", maxDiscountAmount=" + maxDiscountAmount + "]";
22549 ashik.ali 65
	}
66
 
67
}