Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TikhomirovSergey/454a353ae146260a49076f0e05881818 to your computer and use it in GitHub Desktop.
Save TikhomirovSergey/454a353ae146260a49076f0e05881818 to your computer and use it in GitHub Desktop.
@PersistenceCapable(table = "Authors")
public class Author extends PersistableObject {
@PrimaryKey
@Persistent(valueStrategy=IdGeneratorStrategy.INCREMENT)
@Column(name = "Id")
private int id;
@Column(name = "FirstName")
private String firstName;
@Column(name = "LastName")
private String lastName;
@Column(name = "BirthDate", jdbcType = "TIMESTAMP")
private Date birthDate;
@Column(name = "DeathDate", jdbcType = "TIMESTAMP")
private Date deathDate;
@Column(name = "BiographyDescription", length = 10000)
private String biography;
public int getId() {
return id;
}
public String getFirstName() {
return firstName;
}
public Author setFirstName(String firstName) {
this.firstName = firstName;
return this;
}
public String getLastName() {
return lastName;
}
public Author setLastName(String lastName) {
this.lastName = lastName;
return this;
}
public Date getBirthDate() {
return birthDate;
}
public Author setBirthDate(java.util.Date birthDate) {
this.birthDate = birthDate;
return this;
}
public Date getDeathDate() {
return deathDate;
}
public Author setDeathDate(java.util.Date deathDate) {
this.deathDate = deathDate;
return this;
}
public String getBiography() {
return biography;
}
public Author setBiography(String biography) {
this.biography = biography;
return this;
}
public void setId(int id) {
this.id = id;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment