View Javadoc
1   /*
2    *    Copyright 2009-2023 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    *       https://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.enumtypehandler_on_annotation;
17  
18  /**
19   * @since #444
20   *
21   * @author Kazuki Shimizu
22   */
23  public class Person {
24  
25    enum PersonType {
26      PERSON, EMPLOYEE
27    }
28  
29    private Integer id;
30    private String firstName;
31    private String lastName;
32    private PersonType personType;
33  
34    public Person() {
35    }
36  
37    public Person(Integer id, String firstName, String lastName, PersonType personType) {
38      this.id = id;
39      this.firstName = firstName;
40      this.lastName = lastName;
41      this.personType = personType;
42    }
43  
44    public String getFirstName() {
45      return firstName;
46    }
47  
48    public void setFirstName(String firstName) {
49      this.firstName = firstName;
50    }
51  
52    public String getLastName() {
53      return lastName;
54    }
55  
56    public void setLastName(String lastName) {
57      this.lastName = lastName;
58    }
59  
60    public Integer getId() {
61      return id;
62    }
63  
64    public void setId(Integer id) {
65      this.id = id;
66    }
67  
68    public PersonType getPersonType() {
69      return personType;
70    }
71  
72    public void setPersonType(PersonType personType) {
73      this.personType = personType;
74    }
75  
76  }