Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
29707 tejbeer 1
package com.spice.profitmandi.dao.model;
2
 
3
import java.util.List;
4
 
5
import com.spice.profitmandi.common.model.PriceModel;
6
import com.spice.profitmandi.dao.entity.catalog.CustomerOfferItem;
7
 
8
public class CustomPriceModel {
9
	private int itemId;
10
	private PriceModel price;
11
	private List<CustomerOfferItem> cois;
12
 
13
	public CustomPriceModel() {
14
		super();
15
		// TODO Auto-generated constructor stub
16
	}
17
 
18
	public CustomPriceModel(int itemId, PriceModel price) {
19
		super();
20
		this.itemId = itemId;
21
 
22
		this.price = price;
23
	}
24
 
25
	public int getItemId() {
26
		return itemId;
27
	}
28
 
29
	public void setItemId(int itemId) {
30
		this.itemId = itemId;
31
	}
32
 
33
	public PriceModel getPrice() {
34
		return price;
35
	}
36
 
37
	public void setPrice(PriceModel price) {
38
		this.price = price;
39
	}
40
 
41
	public List<CustomerOfferItem> getCois() {
42
		return cois;
43
	}
44
 
45
	public void setCois(List<CustomerOfferItem> cois) {
46
		this.cois = cois;
47
	}
48
 
49
	@Override
50
	public int hashCode() {
51
		final int prime = 31;
52
		int result = 1;
53
		result = prime * result + itemId;
54
		result = prime * result + ((price == null) ? 0 : price.hashCode());
55
		return result;
56
	}
57
 
58
	@Override
59
	public boolean equals(Object obj) {
60
		if (this == obj)
61
			return true;
62
		if (obj == null)
63
			return false;
64
		if (getClass() != obj.getClass())
65
			return false;
66
		CustomPriceModel other = (CustomPriceModel) obj;
67
 
68
		if (itemId != other.itemId)
69
			return false;
70
		if (price == null) {
71
			if (other.price != null)
72
				return false;
73
		} else if (!price.equals(other.price))
74
			return false;
75
		return true;
76
	}
77
 
78
	@Override
79
	public String toString() {
80
		return "CustomPriceModel [itemId=" + itemId + ", price=" + price + ", cois=" + cois + "]";
81
	}
82
 
83
}