Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
24383 amit.gupta 1
package com.spice.profitmandi.dao.entity.cs;
2
 
3
import java.io.Serializable;
4
 
5
import javax.persistence.Column;
6
import javax.persistence.Entity;
7
import javax.persistence.GeneratedValue;
8
import javax.persistence.GenerationType;
9
import javax.persistence.Id;
10
import javax.persistence.Table;
11
 
12
/**
13
 * This class basically contains api details
14
 * 
15
 * @author amit
16
 *
17
 */
18
 
19
@Entity
31860 tejbeer 20
@Table(name="cs.ticket_category")
24383 amit.gupta 21
public class TicketCategory implements Serializable{
22
 
23
	private static final long serialVersionUID = 1L;
24
 
25
	@Id
26
	@Column(name="id", unique=true, updatable=false)
27
	@GeneratedValue(strategy = GenerationType.IDENTITY)
28
	private int id;
29
 
30
	@Column(name="name", unique = true)
31
	private String name;
32
 
33
	@Column(name = "description")
34
	private String description;
35
 
36
	@Override
37
	public String toString() {
38
		return "TicketCategory [id=" + id + ", name=" + name + ", description=" + description + "]";
39
	}
40
 
41
	public int getId() {
42
		return id;
43
	}
44
 
45
	public void setId(int id) {
46
		this.id = id;
47
	}
48
 
49
	public String getName() {
50
		return name;
51
	}
52
 
53
	public void setName(String name) {
54
		this.name = name;
55
	}
56
 
57
	public String getDescription() {
58
		return description;
59
	}
60
 
61
	public void setDescription(String description) {
62
		this.description = description;
63
	}
64
 
65
	@Override
66
	public int hashCode() {
67
		final int prime = 31;
68
		int result = 1;
69
		result = prime * result + id;
70
		return result;
71
	}
72
 
73
	@Override
74
	public boolean equals(Object obj) {
75
		if (this == obj)
76
			return true;
77
		if (obj == null)
78
			return false;
79
		if (getClass() != obj.getClass())
80
			return false;
81
		TicketCategory other = (TicketCategory) obj;
82
		if (id != other.id)
83
			return false;
84
		return true;
85
	}
86
 
87
 
88
 
89
 
90
}