1 23 24 32 33 package enterprise.web_jpa_war.entity; 34 35 import javax.persistence.Column; 36 import javax.persistence.Entity; 37 import javax.persistence.Id; 38 import javax.persistence.Table; 39 40 44 @Entity 45 @Table(name = "PERSON") 46 public class Person { 47 48 @Id 49 @Column(name = "ID") 50 private String id; 51 52 @Column(name = "LASTNAME") 53 private String lastName; 54 55 @Column(name = "FIRSTNAME") 56 private String firstName; 57 58 61 public Person() { 62 } 63 64 public Person(String id, String firstName, String lastName) { 65 this.id = id; 66 this.firstName = firstName; 67 this.lastName = lastName; 68 } 69 70 public String getId() { 71 return this.id; 72 } 73 74 public String getLastName() { 75 return this.lastName; 76 } 77 78 public String getFirstName() { 79 return this.firstName; 80 } 81 82 } 83 | Popular Tags |