Subversion Repositories SmartDukaan

Rev

Rev 32230 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 32230 Rev 34180
Line 1... Line 1...
1
package com.spice.profitmandi.common.model;
1
package com.spice.profitmandi.common.model;
2
 
2
 
-
 
3
import java.util.Objects;
-
 
4
 
3
public class ItemModel {
5
public class ItemModel {
4
	private int itemId;
6
	private int itemId;
5
	private String brand;
7
	private String brand;
6
	private String modelName;
8
	private String modelName;
7
	private String modelNumber;
9
	private String modelNumber;
8
	private String color;
10
	private String color;
9
	private String itemType;
11
	private String itemType;
10
	private boolean focused;
12
	private boolean focused;
-
 
13
	private String status;
11
	public int getItemId() {
14
	public int getItemId() {
12
		return itemId;
15
		return itemId;
13
	}
16
	}
14
	public void setItemId(int itemId) {
17
	public void setItemId(int itemId) {
15
		this.itemId = itemId;
18
		this.itemId = itemId;
Line 37... Line 40...
37
 
40
 
38
	public String getColor() {
41
	public String getColor() {
39
		return color;
42
		return color;
40
	}
43
	}
41
 
44
 
42
	public ItemModel(int itemId, String brand, String modelName, String modelNumber, String color, String itemType, boolean focused) {
45
	public ItemModel(int itemId, String brand, String modelName, String modelNumber, String color, String itemType, boolean focused, String status) {
43
		this.itemId = itemId;
46
		this.itemId = itemId;
44
		this.brand = brand;
47
		this.brand = brand;
45
		this.modelName = modelName;
48
		this.modelName = modelName;
46
		this.modelNumber = modelNumber;
49
		this.modelNumber = modelNumber;
47
		this.color = color;
50
		this.color = color;
48
		this.itemType = itemType;
51
		this.itemType = itemType;
49
		this.focused = focused;
52
		this.focused = focused;
-
 
53
		this.status = status;
50
	}
54
	}
51
 
55
 
52
	public boolean isFocused() {
56
	public boolean isFocused() {
53
		return focused;
57
		return focused;
54
	}
58
	}
Line 75... Line 79...
75
 
79
 
76
	public void setFocused(boolean focused) {
80
	public void setFocused(boolean focused) {
77
		this.focused = focused;
81
		this.focused = focused;
78
	}
82
	}
79
 
83
 
-
 
84
	public String getStatus() {
-
 
85
		return status;
-
 
86
	}
-
 
87
 
-
 
88
	public void setStatus(String status) {
-
 
89
		this.status = status;
-
 
90
	}
-
 
91
 
80
	@Override
92
	@Override
81
	public int hashCode() {
93
	public boolean equals(Object o) {
82
		final int prime = 31;
94
		if (this == o) return true;
83
		int result = 1;
95
		if (o == null || getClass() != o.getClass()) return false;
84
		result = prime * result + itemId;
96
		ItemModel itemModel = (ItemModel) o;
85
		return result;
97
		return itemId == itemModel.itemId && focused == itemModel.focused && Objects.equals(brand, itemModel.brand) && Objects.equals(modelName, itemModel.modelName) && Objects.equals(modelNumber, itemModel.modelNumber) && Objects.equals(color, itemModel.color) && Objects.equals(itemType, itemModel.itemType) && Objects.equals(status, itemModel.status);
86
	}
98
	}
87
 
99
 
88
	@Override
100
	@Override
89
	public boolean equals(Object obj) {
101
	public int hashCode() {
90
		if (this == obj)
-
 
91
			return true;
-
 
92
		if (obj == null)
-
 
93
			return false;
-
 
94
		if (getClass() != obj.getClass())
-
 
95
			return false;
-
 
96
		ItemModel other = (ItemModel) obj;
102
		return Objects.hash(itemId, brand, modelName, modelNumber, color, itemType, focused, status);
97
		if (itemId != other.itemId)
-
 
98
			return false;
-
 
99
		return true;
-
 
100
	}
103
	}
-
 
104
 
101
	@Override
105
	@Override
102
	public String toString() {
106
	public String toString() {
-
 
107
		return "ItemModel{" +
-
 
108
				"itemId=" + itemId +
-
 
109
				", brand='" + brand + '\'' +
103
		return "ItemModel [itemId=" + itemId + ", brand=" + brand + ", modelName=" + modelName + ", modelNumber="
110
				", modelName='" + modelName + '\'' +
104
				+ modelNumber + ", color=" + color + ", itemType=" + itemType + "]";
111
				", modelNumber='" + modelNumber + '\'' +
-
 
112
				", color='" + color + '\'' +
-
 
113
				", itemType='" + itemType + '\'' +
-
 
114
				", focused=" + focused +
-
 
115
				", status='" + status + '\'' +
-
 
116
				'}';
105
	}
117
	}
106
	
118
 
107
	
119
 
108
}
120
}