Subversion Repositories SmartDukaan

Rev

Rev 23405 | Rev 30003 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
23405 amit.gupta 1
package com.spice.profitmandi.dao.entity.catalog;
2
 
3
import javax.persistence.Column;
4
import javax.persistence.Entity;
5
import javax.persistence.Id;
6
import javax.persistence.Table;
7
 
8
@Entity
9
@Table(name="catalog.category", schema = "catalog")
10
public class Category {
11
	@Id
12
	@Column(name="id", columnDefinition = "int(11)")
13
	private int id;
14
 
15
	@Column(name="label", length = 100)
16
	private String label;
17
 
18
	@Override
19
	public int hashCode() {
20
		final int prime = 31;
21
		int result = 1;
22
		result = prime * result + id;
23
		return result;
24
	}
25
 
26
	@Override
27
	public boolean equals(Object obj) {
28
		if (this == obj)
29
			return true;
30
		if (obj == null)
31
			return false;
32
		if (getClass() != obj.getClass())
33
			return false;
34
		Category other = (Category) obj;
35
		if (id != other.id)
36
			return false;
37
		return true;
38
	}
39
 
40
	@Override
41
	public String toString() {
42
		return "Category [id=" + id + ", label=" + label + "]";
43
	}
44
 
45
	public String getLabel() {
46
		return label;
47
	}
48
 
49
	public void setLabel(String label) {
50
		this.label = label;
51
	}
25011 amit.gupta 52
 
53
	public int getId() {
54
		return id;
55
	}
56
 
57
	public void setId(int id) {
58
		this.id = id;
59
	}
60
 
61
 
23405 amit.gupta 62
}