Subversion Repositories SmartDukaan

Rev

Rev 24349 | Rev 31860 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
24349 amit.gupta 1
package com.spice.profitmandi.dao.entity.inventory;
2
 
3
import javax.persistence.Column;
4
import javax.persistence.Entity;
5
import javax.persistence.Id;
6
import javax.persistence.Table;
7
 
8
@Entity
9
@Table(name="inventory.statemaster", schema = "inventory")
10
public class State {
11
	@Id
12
	@Column
13
	private int id;
14
 
28493 tejbeer 15
 
16
	@Column(name="name")
24349 amit.gupta 17
	private String name;
18
 
19
	@Column(name="stateCode")
20
	private String code;
21
 
22
	@Column
23
	private String shortName;
24
 
25
 
26
 
27
 
28
	public String getCode() {
29
		return code;
30
	}
31
 
32
 
33
	public void setCode(String code) {
34
		this.code = code;
35
	}
36
 
37
 
38
	@Override
39
	public int hashCode() {
40
		final int prime = 31;
41
		int result = 1;
42
		result = prime * result + ((code == null) ? 0 : code.hashCode());
43
		result = prime * result + id;
44
		result = prime * result + ((name == null) ? 0 : name.hashCode());
45
		result = prime * result + ((shortName == null) ? 0 : shortName.hashCode());
46
		return result;
47
	}
48
 
49
 
50
	@Override
51
	public boolean equals(Object obj) {
52
		if (this == obj)
53
			return true;
54
		if (obj == null)
55
			return false;
56
		if (getClass() != obj.getClass())
57
			return false;
58
		State other = (State) obj;
59
		if (code == null) {
60
			if (other.code != null)
61
				return false;
62
		} else if (!code.equals(other.code))
63
			return false;
64
		if (id != other.id)
65
			return false;
66
		if (name == null) {
67
			if (other.name != null)
68
				return false;
69
		} else if (!name.equals(other.name))
70
			return false;
71
		if (shortName == null) {
72
			if (other.shortName != null)
73
				return false;
74
		} else if (!shortName.equals(other.shortName))
75
			return false;
76
		return true;
77
	}
78
 
79
 
80
	public int getId() {
81
		return id;
82
	}
83
 
84
 
85
	public void setId(int id) {
86
		this.id = id;
87
	}
88
 
89
 
90
	public String getName() {
91
		return name;
92
	}
93
 
94
 
95
	public void setName(String name) {
96
		this.name = name;
97
	}
98
 
99
 
100
 
101
	public String getShortName() {
102
		return shortName;
103
	}
104
 
105
 
106
	public void setShortName(String shortName) {
107
		this.shortName = shortName;
108
	}
109
 
110
 
111
	@Override
112
	public String toString() {
113
		return "State [id=" + id + ", name=" + name + ", code=" + code + ", shortName=" + shortName + "]";
114
	}
115
 
116
 
117
}