Subversion Repositories SmartDukaan

Rev

Rev 21614 | Rev 22384 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
21543 ashik.ali 1
package com.spice.profitmandi.common.model;
2
 
3
public class CustomLineItem {
4
	private String brand;
5
	private String modelName;
6
	private String modelNumber;
7
	private String color;
21614 kshitij.so 8
	private String displayName;
21543 ashik.ali 9
	private float quantity;
10
	private float unitPrice;
11
	public String getBrand() {
12
		return brand;
13
	}
14
	public void setBrand(String brand) {
15
		this.brand = brand;
16
	}
17
	public String getModelName() {
18
		return modelName;
19
	}
20
	public void setModelName(String modelName) {
21
		this.modelName = modelName;
22
	}
23
	public String getModelNumber() {
24
		return modelNumber;
25
	}
26
	public void setModelNumber(String modelNumber) {
27
		this.modelNumber = modelNumber;
28
	}
29
	public String getColor() {
30
		return color;
31
	}
32
	public void setColor(String color) {
33
		this.color = color;
34
	}
35
	public float getQuantity() {
36
		return quantity;
37
	}
38
	public void setQuantity(float quantity) {
39
		this.quantity = quantity;
40
	}
41
	public float getUnitPrice() {
42
		return unitPrice;
43
	}
44
	public void setUnitPrice(float unitPrice) {
45
		this.unitPrice = unitPrice;
46
	}
21614 kshitij.so 47
	public String getDisplayName() {
48
		return displayName;
49
	}
50
	public void setDisplayName(String displayName) {
51
		this.displayName = displayName;
52
	}
21923 ashik.ali 53
 
54
 
21600 ashik.ali 55
	@Override
21923 ashik.ali 56
	public int hashCode() {
57
		final int prime = 31;
58
		int result = 1;
59
		result = prime * result + ((brand == null) ? 0 : brand.hashCode());
60
		result = prime * result + ((color == null) ? 0 : color.hashCode());
61
		result = prime * result + ((displayName == null) ? 0 : displayName.hashCode());
62
		result = prime * result + ((modelName == null) ? 0 : modelName.hashCode());
63
		result = prime * result + ((modelNumber == null) ? 0 : modelNumber.hashCode());
64
		result = prime * result + Float.floatToIntBits(quantity);
65
		result = prime * result + Float.floatToIntBits(unitPrice);
66
		return result;
67
	}
68
	@Override
69
	public boolean equals(Object obj) {
70
		if (this == obj)
71
			return true;
72
		if (obj == null)
73
			return false;
74
		if (getClass() != obj.getClass())
75
			return false;
76
		CustomLineItem other = (CustomLineItem) obj;
77
		if (brand == null) {
78
			if (other.brand != null)
79
				return false;
80
		} else if (!brand.equals(other.brand))
81
			return false;
82
		if (color == null) {
83
			if (other.color != null)
84
				return false;
85
		} else if (!color.equals(other.color))
86
			return false;
87
		if (displayName == null) {
88
			if (other.displayName != null)
89
				return false;
90
		} else if (!displayName.equals(other.displayName))
91
			return false;
92
		if (modelName == null) {
93
			if (other.modelName != null)
94
				return false;
95
		} else if (!modelName.equals(other.modelName))
96
			return false;
97
		if (modelNumber == null) {
98
			if (other.modelNumber != null)
99
				return false;
100
		} else if (!modelNumber.equals(other.modelNumber))
101
			return false;
102
		if (Float.floatToIntBits(quantity) != Float.floatToIntBits(other.quantity))
103
			return false;
104
		if (Float.floatToIntBits(unitPrice) != Float.floatToIntBits(other.unitPrice))
105
			return false;
106
		return true;
107
	}
108
	@Override
21600 ashik.ali 109
	public String toString() {
110
		return "CustomLineItem [brand=" + brand + ", modelName=" + modelName + ", modelNumber=" + modelNumber
111
				+ ", color=" + color + ", quantity=" + quantity + ", unitPrice=" + unitPrice + "]";
112
	}
113
 
114
 
21543 ashik.ali 115
}