Skip to content

Instantly share code, notes, and snippets.

@hodlbirb
Last active February 29, 2016 08:54
Show Gist options
  • Save hodlbirb/0778bf9cf1c8a2a7165d to your computer and use it in GitHub Desktop.
Save hodlbirb/0778bf9cf1c8a2a7165d to your computer and use it in GitHub Desktop.
package Model;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
@Entity(name = "persons")
public class Person implements Serializable {
@Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
private Integer id;
private String first_name;
private String last_name;
private Date dob;
public Person() { }
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getFirstName() {
return first_name;
}
public void setFirstName(final String first_name) {
this.first_name = first_name;
}
public String getLastName() {
return last_name;
}
public void setLastName(final String last_name) {
this.last_name = last_name;
}
public Date getDob() {
return dob;
}
public void setDob(final Date dob) {
this.dob = dob;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment