Subversion Repositories SmartDukaan

Rev

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