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/1c25521412af0d72d4e504931b33460f to your computer and use it in GitHub Desktop.
Save TikhomirovSergey/1c25521412af0d72d4e504931b33460f to your computer and use it in GitHub Desktop.
@PersistenceCapable(table = "Books")
public class Book extends PersistableObject {
@PrimaryKey
@Persistent(valueStrategy=IdGeneratorStrategy.INCREMENT)
@Column(name = "ID")
private int id;
@Column(name = "Name")
private String name;
@Column(name = "Author")
private Author author;
@Column(name = "YearOfFinishing")
private int yearOfFinishing;
public int getId() {
return id;
}
public String getName() {
return name;
}
public Book setName(String name) {
this.name = name;
return this;
}
public Author getAuthor() {
return author;
}
public Book setAuthor(Author author) {
this.author = author;
return this;
}
public int getYearOfFinishing() {
return yearOfFinishing;
}
public Book setYearOfFinishing(int yearOfFinishing) {
this.yearOfFinishing = yearOfFinishing;
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