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_sub_category", schema = "cs")
24383 amit.gupta 21
public class TicketSubCategory 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="category_id")
24417 govind 31
	private int categoryId;
24383 amit.gupta 32
 
33
	@Override
34
	public int hashCode() {
35
		final int prime = 31;
36
		int result = 1;
24417 govind 37
		result = prime * result + categoryId;
24383 amit.gupta 38
		result = prime * result + ((description == null) ? 0 : description.hashCode());
39
		result = prime * result + id;
40
		result = prime * result + ((name == null) ? 0 : name.hashCode());
41
		return result;
42
	}
43
 
44
	@Override
45
	public boolean equals(Object obj) {
46
		if (this == obj)
47
			return true;
48
		if (obj == null)
49
			return false;
50
		if (getClass() != obj.getClass())
51
			return false;
52
		TicketSubCategory other = (TicketSubCategory) obj;
24417 govind 53
		if (categoryId != other.categoryId)
24383 amit.gupta 54
			return false;
55
		if (description == null) {
56
			if (other.description != null)
57
				return false;
58
		} else if (!description.equals(other.description))
59
			return false;
60
		if (id != other.id)
61
			return false;
62
		if (name == null) {
63
			if (other.name != null)
64
				return false;
65
		} else if (!name.equals(other.name))
66
			return false;
67
		return true;
68
	}
69
 
70
	public int getId() {
71
		return id;
72
	}
73
 
74
	public void setId(int id) {
75
		this.id = id;
76
	}
77
 
24417 govind 78
	public int getcategoryId() {
79
		return categoryId;
24383 amit.gupta 80
	}
81
 
24417 govind 82
	public void setcategoryId(int categoryId) {
83
		this.categoryId = categoryId;
24383 amit.gupta 84
	}
85
 
86
	public String getName() {
87
		return name;
88
	}
89
 
90
	public void setName(String name) {
91
		this.name = name;
92
	}
93
 
94
	public String getDescription() {
95
		return description;
96
	}
97
 
98
	public void setDescription(String description) {
99
		this.description = description;
100
	}
101
 
102
	@Override
103
	public String toString() {
24417 govind 104
		return "TicketSubCategory [id=" + id + ", categoryId=" + categoryId + ", name=" + name + ", description="
24383 amit.gupta 105
				+ description + "]";
106
	}
107
 
108
	@Column(name="name", unique = true)
109
	private String name;
110
 
111
	@Column(name = "description")
112
	private String description;
113
 
114
}