User.java 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*
  2. * Copyright 2020 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 example;
  17. import jakarta.persistence.Entity;
  18. import jakarta.persistence.GeneratedValue;
  19. import jakarta.persistence.GenerationType;
  20. import jakarta.persistence.Id;
  21. /**
  22. * A user.
  23. *
  24. * @author Rob Winch
  25. */
  26. @Entity
  27. public class User {
  28. @GeneratedValue(strategy = GenerationType.AUTO)
  29. @Id
  30. private Long id;
  31. private String firstName;
  32. private String lastName;
  33. private String email;
  34. private String password;
  35. public Long getId() {
  36. return this.id;
  37. }
  38. public void setId(Long id) {
  39. this.id = id;
  40. }
  41. public String getFirstName() {
  42. return this.firstName;
  43. }
  44. public void setFirstName(String firstName) {
  45. this.firstName = firstName;
  46. }
  47. public String getLastName() {
  48. return this.lastName;
  49. }
  50. public void setLastName(String lastName) {
  51. this.lastName = lastName;
  52. }
  53. public String getEmail() {
  54. return this.email;
  55. }
  56. public void setEmail(String email) {
  57. this.email = email;
  58. }
  59. public String getPassword() {
  60. return this.password;
  61. }
  62. public void setPassword(String password) {
  63. this.password = password;
  64. }
  65. }