Subversion Repositories SmartDukaan

Rev

Rev 24383 | 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
24417 govind 20
@Table(name="cs.ticket_category", schema = "cs")
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 + ((description == null) ? 0 : description.hashCode());
70
		result = prime * result + id;
71
		result = prime * result + ((name == null) ? 0 : name.hashCode());
72
		return result;
73
	}
74
 
75
	@Override
76
	public boolean equals(Object obj) {
77
		if (this == obj)
78
			return true;
79
		if (obj == null)
80
			return false;
81
		if (getClass() != obj.getClass())
82
			return false;
83
		TicketCategory other = (TicketCategory) obj;
84
		if (description == null) {
85
			if (other.description != null)
86
				return false;
87
		} else if (!description.equals(other.description))
88
			return false;
89
		if (id != other.id)
90
			return false;
91
		if (name == null) {
92
			if (other.name != null)
93
				return false;
94
		} else if (!name.equals(other.name))
95
			return false;
96
		return true;
97
	}
98
 
99
 
100
 
101
 
102
}