Subversion Repositories SmartDukaan

Rev

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

Rev 26588 Rev 27124
Line 3... Line 3...
3
import java.util.List;
3
import java.util.List;
4
 
4
 
5
public class ItemTypeParams {
5
public class ItemTypeParams {
6
	private List<Integer> catalogId;
6
	private List<Integer> catalogId;
7
	private List<String> brands;
7
	private List<String> brands;
-
 
8
	private int categoryId;
-
 
9
 
-
 
10
	@Override
-
 
11
	public int hashCode() {
-
 
12
		final int prime = 31;
-
 
13
		int result = 1;
-
 
14
		result = prime * result + ((brands == null) ? 0 : brands.hashCode());
-
 
15
		result = prime * result + ((catalogId == null) ? 0 : catalogId.hashCode());
-
 
16
		result = prime * result + categoryId;
-
 
17
		return result;
-
 
18
	}
-
 
19
 
-
 
20
	@Override
-
 
21
	public boolean equals(Object obj) {
-
 
22
		if (this == obj)
-
 
23
			return true;
-
 
24
		if (obj == null)
-
 
25
			return false;
-
 
26
		if (getClass() != obj.getClass())
-
 
27
			return false;
-
 
28
		ItemTypeParams other = (ItemTypeParams) obj;
-
 
29
		if (brands == null) {
-
 
30
			if (other.brands != null)
-
 
31
				return false;
-
 
32
		} else if (!brands.equals(other.brands))
-
 
33
			return false;
-
 
34
		if (catalogId == null) {
-
 
35
			if (other.catalogId != null)
-
 
36
				return false;
-
 
37
		} else if (!catalogId.equals(other.catalogId))
-
 
38
			return false;
-
 
39
		if (categoryId != other.categoryId)
-
 
40
			return false;
-
 
41
		return true;
-
 
42
	}
-
 
43
 
-
 
44
	public int getCategoryId() {
-
 
45
		return categoryId;
-
 
46
	}
-
 
47
 
-
 
48
	public void setCategoryId(int categoryId) {
-
 
49
		this.categoryId = categoryId;
-
 
50
	}
8
 
51
 
9
	public ItemTypeParams(List<Integer> catalogId, List<String> brands) {
52
	public ItemTypeParams(List<Integer> catalogId, List<String> brands) {
10
		super();
53
		super();
11
		this.catalogId = catalogId;
54
		this.catalogId = catalogId;
12
		this.brands = brands;
55
		this.brands = brands;
Line 32... Line 75...
32
		this.brands = brands;
75
		this.brands = brands;
33
	}
76
	}
34
 
77
 
35
	@Override
78
	@Override
36
	public String toString() {
79
	public String toString() {
37
		return "ItemTypeParams [catalogId=" + catalogId + ", brands=" + brands + "]";
80
		return "ItemTypeParams [catalogId=" + catalogId + ", brands=" + brands + ", categoryId=" + categoryId + "]";
38
	}
81
	}
39
 
82
 
40
}
83
}