Subversion Repositories SmartDukaan

Rev

Rev 21734 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
21431 ashik.ali 1
package com.spice.profitmandi.web.req;
2
 
3
import java.util.Set;
4
 
5
public class Category {
6
	private int id;
7
	private String name;
8
	private Set<Brand> brands;
9
	public int getId() {
10
		return id;
11
	}
12
	public void setId(int id) {
13
		this.id = id;
14
	}
15
	public String getName() {
16
		return name;
17
	}
18
	public void setName(String name) {
19
		this.name = name;
20
	}
21
	public Set<Brand> getBrands() {
22
		return brands;
23
	}
24
	public void setBrands(Set<Brand> brands) {
25
		this.brands = brands;
26
	}
27
 
28
	@Override
29
	public boolean equals(Object object) {
30
		if(!(object instanceof Category)){
31
			return false;
32
		}
33
		Category category = (Category)object;
34
		if(this.id == category.id){
35
			return true;
36
		}else{
37
			return false;
38
		}
39
	}
23045 ashik.ali 40
	@Override
41
	public String toString() {
42
		return "Category [id=" + id + ", name=" + name + ", brands=" + brands + "]";
43
	}
21431 ashik.ali 44
}