Subversion Repositories SmartDukaan

Rev

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