1 /*
2 * Copyright 2009-2021 the original author or authors.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
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 }