1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.ibatis.submitted.constructor_columnprefix;
17
18 public class EntityKey {
19 private Integer id;
20
21 public Integer getId() {
22 return id;
23 }
24
25 public void setId(Integer id) {
26 this.id = id;
27 }
28
29 @Override
30 public int hashCode() {
31 final int prime = 31;
32 int result = 1;
33 result = prime * result + ((id == null) ? 0 : id.hashCode());
34 return result;
35 }
36
37 @Override
38 public boolean equals(Object obj) {
39 if (this == obj)
40 return true;
41 if (obj == null)
42 return false;
43 if (getClass() != obj.getClass())
44 return false;
45 EntityKey other = (EntityKey) obj;
46 if (id == null) {
47 if (other.id != null)
48 return false;
49 } else if (!id.equals(other.id))
50 return false;
51 return true;
52 }
53 }