content: package com.study.benchmarkorm.model;
  
  import java.io.Serializable;
  
  import io.requery.Entity;
  import io.requery.Generated;
  import io.requery.Key;
  import io.requery.ManyToOne;
  
  @Entity
  public class AbstractBook implements Serializable {
      @Key
      @Generated
      int id;
  
      String author;
  
      String title;
  
      int pagesCount;
  
      int bookId;
  
      @ManyToOne
      Library library;
  
  
      public AbstractBook() {
      }
  
      public AbstractBook(String author, String title, int pagesCount, int bookId) {
          this.author = author;
          this.title = title;
          this.pagesCount = pagesCount;
          this.bookId = bookId;
      }
  
      public AbstractBook(String author, String title, int pagesCount, int bookId, Library library) {
          this.author = author;
          this.title = title;
          this.pagesCount = pagesCount;
          this.bookId = bookId;
          this.library = library;
      }
  
      public String getAuthor() {
          return author;
      }
  
      public void setAuthor(String author) {
          this.author = author;
      }
  
      public String getTitle() {
          return title;
      }
  
      public void setTitle(String title) {
          this.title = title;
      }
  
      public int getPagesCount() {
          return pagesCount;
      }
  
      public void setPagesCount(int pagesCount) {
          this.pagesCount = pagesCount;
      }
  
      public int getBookId() {
          return bookId;
      }
  
      public void setBookId(int bookId) {
          this.bookId = bookId;
      }
      
      public Library getLibrary() {
          return library;
      }
  
      public void setLibrary(Library library) {
          this.library = library;
      }
  
      @Override
      public String toString() {
          return "Book{" +
                  "author='" + author + '\'' +
                  ", title='" + title + '\'' +
                  ", pagesCount=" + pagesCount +
                  ", bookId=" + bookId +
                  '}';
      }
  }
  