View Javadoc
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.blocking_cache;
17  
18  import java.io.Serializable;
19  
20  public class Person implements Serializable {
21  
22    private int id;
23    private String firstname;
24    private String lastname;
25  
26    public Person() {
27    }
28  
29    public Person(int id, String firstname, String lastname) {
30      setId(id);
31      setFirstname(firstname);
32      setLastname(lastname);
33    }
34  
35    public int getId() {
36      return id;
37    }
38  
39    public void setId(int id) {
40      this.id = id;
41    }
42  
43    public String getFirstname() {
44      return firstname;
45    }
46  
47    public void setFirstname(String firstname) {
48      this.firstname = firstname;
49    }
50  
51    public String getLastname() {
52      return lastname;
53    }
54  
55    public void setLastname(String lastname) {
56      this.lastname = lastname;
57    }
58  
59    @Override
60    public String toString() {
61      StringBuilder sb = new StringBuilder();
62      sb.append("id=").append(id);
63      sb.append(", lastname=").append(lastname);
64      sb.append(", firstname=").append(firstname);
65      return sb.toString();
66    }
67  
68  }