Subversion Repositories SmartDukaan

Rev

Rev 25011 | Rev 31860 | 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
 
30003 tejbeer 3
import java.util.List;
4
 
23405 amit.gupta 5
import javax.persistence.Column;
6
import javax.persistence.Entity;
7
import javax.persistence.Id;
8
import javax.persistence.Table;
9
 
10
@Entity
30003 tejbeer 11
@Table(name = "catalog.category", schema = "catalog")
23405 amit.gupta 12
public class Category {
13
	@Id
30003 tejbeer 14
	@Column(name = "id", columnDefinition = "int(11)")
23405 amit.gupta 15
	private int id;
30003 tejbeer 16
 
17
	@Column(name = "label", length = 100)
23405 amit.gupta 18
	private String label;
19
 
30003 tejbeer 20
	@Column(name = "description")
21
	private String description;
22
 
23
	@Column(name = "parent_category_id")
24
	private long parentCategoryId;
25
 
26
	@Column(name = "display_name")
27
	private String displayName;
28
 
29
	public String getDescription() {
30
		return description;
31
	}
32
 
33
	public void setDescription(String description) {
34
		this.description = description;
35
	}
36
 
37
	public long getParentCategoryId() {
38
		return parentCategoryId;
39
	}
40
 
41
	public void setParentCategoryId(long parentCategoryId) {
42
		this.parentCategoryId = parentCategoryId;
43
	}
44
 
45
	public String getDisplayName() {
46
		return displayName;
47
	}
48
 
49
	public void setDisplayName(String displayName) {
50
		this.displayName = displayName;
51
	}
52
 
23405 amit.gupta 53
	@Override
54
	public int hashCode() {
55
		final int prime = 31;
56
		int result = 1;
57
		result = prime * result + id;
58
		return result;
59
	}
60
 
61
	@Override
62
	public boolean equals(Object obj) {
63
		if (this == obj)
64
			return true;
65
		if (obj == null)
66
			return false;
67
		if (getClass() != obj.getClass())
68
			return false;
69
		Category other = (Category) obj;
70
		if (id != other.id)
71
			return false;
72
		return true;
73
	}
74
 
75
	@Override
76
	public String toString() {
30003 tejbeer 77
		return "Category [id=" + id + ", label=" + label + ", description=" + description + ", parentCategoryId="
78
				+ parentCategoryId + ", displayName=" + displayName + "]";
23405 amit.gupta 79
	}
80
 
81
	public String getLabel() {
82
		return label;
83
	}
84
 
85
	public void setLabel(String label) {
86
		this.label = label;
87
	}
25011 amit.gupta 88
 
89
	public int getId() {
90
		return id;
91
	}
92
 
93
	public void setId(int id) {
94
		this.id = id;
95
	}
30003 tejbeer 96
 
23405 amit.gupta 97
}