Subversion Repositories SmartDukaan

Rev

Rev 28493 | Go to most recent revision | Details | 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
 
15
	@Column
16
	private String name;
17
 
18
	@Column(name="stateCode")
19
	private String code;
20
 
21
	@Column
22
	private String shortName;
23
 
24
 
25
 
26
 
27
	public String getCode() {
28
		return code;
29
	}
30
 
31
 
32
	public void setCode(String code) {
33
		this.code = code;
34
	}
35
 
36
 
37
	@Override
38
	public int hashCode() {
39
		final int prime = 31;
40
		int result = 1;
41
		result = prime * result + ((code == null) ? 0 : code.hashCode());
42
		result = prime * result + id;
43
		result = prime * result + ((name == null) ? 0 : name.hashCode());
44
		result = prime * result + ((shortName == null) ? 0 : shortName.hashCode());
45
		return result;
46
	}
47
 
48
 
49
	@Override
50
	public boolean equals(Object obj) {
51
		if (this == obj)
52
			return true;
53
		if (obj == null)
54
			return false;
55
		if (getClass() != obj.getClass())
56
			return false;
57
		State other = (State) obj;
58
		if (code == null) {
59
			if (other.code != null)
60
				return false;
61
		} else if (!code.equals(other.code))
62
			return false;
63
		if (id != other.id)
64
			return false;
65
		if (name == null) {
66
			if (other.name != null)
67
				return false;
68
		} else if (!name.equals(other.name))
69
			return false;
70
		if (shortName == null) {
71
			if (other.shortName != null)
72
				return false;
73
		} else if (!shortName.equals(other.shortName))
74
			return false;
75
		return true;
76
	}
77
 
78
 
79
	public int getId() {
80
		return id;
81
	}
82
 
83
 
84
	public void setId(int id) {
85
		this.id = id;
86
	}
87
 
88
 
89
	public String getName() {
90
		return name;
91
	}
92
 
93
 
94
	public void setName(String name) {
95
		this.name = name;
96
	}
97
 
98
 
99
 
100
	public String getShortName() {
101
		return shortName;
102
	}
103
 
104
 
105
	public void setShortName(String shortName) {
106
		this.shortName = shortName;
107
	}
108
 
109
 
110
	@Override
111
	public String toString() {
112
		return "State [id=" + id + ", name=" + name + ", code=" + code + ", shortName=" + shortName + "]";
113
	}
114
 
115
 
116
}