content: package com.alibaba.cola.unittest.db;
  
  import jakarta.persistence.Entity;
  import jakarta.persistence.Id;
  import jakarta.persistence.NamedQueries;
  import jakarta.persistence.NamedQuery;
  
  @Entity
  @NamedQueries({ @NamedQuery(name = "Person.find", query = "SELECT p from Person p where p.firstName like :name "
          + "or p.lastName like :name") })
  public class Person {
  
      @Id
      private int id;
  
      private String title;
  
      private String firstName;
  
      private String lastName;
  
      public int getId() {
          return id;
      }
  
      public String getTitle() {
          return title;
      }
  
      public void setTitle(String title) {
          this.title = title;
      }
  
      public String getFirstName() {
          return firstName;
      }
  
      public void setFirstName(String firstName) {
          this.firstName = firstName;
      }
  
      public String getLastName() {
          return lastName;
      }
  
      public void setLastName(String lastName) {
          this.lastName = lastName;
      }
  
      @Override
      public String toString() {
          return "Person{" +
                  "id=" + id +
                  ", title='" + title + '\'' +
                  ", firstName='" + firstName + '\'' +
                  ", lastName='" + lastName + '\'' +
                  '}';
      }
  }
  