Created
October 30, 2019 16:48
-
-
Save TikhomirovSergey/1c25521412af0d72d4e504931b33460f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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