Subversion Repositories SmartDukaan

Rev

Rev 31860 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
24407 govind 1
package com.spice.profitmandi.dao.entity.cs;
2
 
31170 amit.gupta 3
import javax.persistence.*;
24407 govind 4
import java.io.Serializable;
5
 
6
/**
7
 * This class basically contains api details
8
 * 
9
 * @author Govind
10
 *
11
 */
12
 
13
@Entity
31860 tejbeer 14
@Table(name="cs.region")
24407 govind 15
public class Region 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;
31170 amit.gupta 26
 
27
 
24407 govind 28
	@Column(name = "description")
29
	private String description;
30
 
37120 vikas 31
	/** LMS short code (UPW/UPE/RJ/PB/HR/UK/DL) — used for the LMS id prefix + display. */
32
	@Column(name = "region_code")
33
	private String regionCode;
34
 
35
	public String getRegionCode() {
36
		return regionCode;
37
	}
38
 
39
	public void setRegionCode(String regionCode) {
40
		this.regionCode = regionCode;
41
	}
42
 
24407 govind 43
	@Override
44
	public String toString() {
45
		return "Region [id=" + id + ", name=" + name + ", description=" + description + "]";
46
	}
47
 
48
	public int getId() {
49
		return id;
50
	}
51
 
52
	public void setId(int id) {
53
		this.id = id;
54
	}
55
 
56
	public String getName() {
57
		return name;
58
	}
59
 
60
	public void setName(String name) {
61
		this.name = name;
62
	}
63
 
64
	public String getDescription() {
65
		return description;
66
	}
67
 
68
	public void setDescription(String description) {
69
		this.description = description;
70
	}
71
 
72
	@Override
73
	public int hashCode() {
74
		final int prime = 31;
75
		int result = 1;
76
		result = prime * result + ((description == null) ? 0 : description.hashCode());
77
		result = prime * result + id;
78
		result = prime * result + ((name == null) ? 0 : name.hashCode());
79
		return result;
80
	}
81
 
82
	@Override
83
	public boolean equals(Object obj) {
84
		if (this == obj)
85
			return true;
86
		if (obj == null)
87
			return false;
88
		if (getClass() != obj.getClass())
89
			return false;
90
		Region other = (Region) obj;
91
		if (description == null) {
92
			if (other.description != null)
93
				return false;
94
		} else if (!description.equals(other.description))
95
			return false;
96
		if (id != other.id)
97
			return false;
98
		if (name == null) {
99
			if (other.name != null)
100
				return false;
101
		} else if (!name.equals(other.name))
102
			return false;
103
		return true;
104
	}
105
 
106
 
107
 
108
 
109
}