Subversion Repositories SmartDukaan

Rev

Rev 24417 | Go to most recent revision | Details | 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
20
@Table(name="cs.sub_category", schema = "cs")
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")
31
	private int category_id;
32
 
33
	@Override
34
	public int hashCode() {
35
		final int prime = 31;
36
		int result = 1;
37
		result = prime * result + category_id;
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;
53
		if (category_id != other.category_id)
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
 
78
	public int getCategory_id() {
79
		return category_id;
80
	}
81
 
82
	public void setCategory_id(int category_id) {
83
		this.category_id = category_id;
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() {
104
		return "TicketSubCategory [id=" + id + ", category_id=" + category_id + ", name=" + name + ", description="
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
}