Subversion Repositories SmartDukaan

Rev

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