Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Entity
- @Table(name = "Person")
- public class Person {
- Long id;
- String firstName;
- String lastName;
- String phone;
- Integer age;
- public Person(){}
- public void setId(Long id) { this.id = id; }
- @Id
- @GeneratedValue(generator="increment")
- @GenericGenerator(name="increment", strategy = "increment")
- public Long getId() { return id; }
- public void setFirstName(String firstName) { this.firstName = firstName; }
- @Column
- public String getFirstName() { return firstName; }
- public void setLastName(String lastName) { this.lastName = lastName; }
- @Column
- public String getLastName() { return lastName; }
- public void setAge(Integer age) { this.age = age; }
- @Column
- public Integer getAge() { return age; }
- public void setPhone(String phone) { this.phone = phone; }
- @Column
- public String getPhone() { return phone; }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement