content: package org.agoncal.book.javaee7.chapter05.ex11;
  
  import javax.persistence.*;
  
  /**
   * @author Antonio Goncalves
   *         APress Book - Beginning Java EE 7 with Glassfish 4
   *         http://www.apress.com/
   *         http://www.antoniogoncalves.org
   *         --
   */
  @Entity
  @Table(name = "ex11_book")
  public class Book11 {
  
    // ======================================
    // =             Attributes             =
    // ======================================
  
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    @Column(name = "book_title", nullable = false, updatable = false)
    private String title;
    private Float price;
    @Column(length = 2000)
    private String description;
    private String isbn;
    @Column(name = "nb_of_page", nullable = false)
    private Integer nbOfPage;
    private Boolean illustrations;
  
    // ======================================
    // =            Constructors            =
    // ======================================
  
    public Book11() {
    }
  
    public Book11(String title, Float price, String description, String isbn, Integer nbOfPage, Boolean illustrations) {
      this.title = title;
      this.price = price;
      this.description = description;
      this.isbn = isbn;
      this.nbOfPage = nbOfPage;
      this.illustrations = illustrations;
    }
  
    // ======================================
    // =          Getters & Setters         =
    // ======================================
  
    public Long getId() {
      return id;
    }
  
    public String getTitle() {
      return title;
    }
  
    public void setTitle(String title) {
      this.title = title;
    }
  
    public Float getPrice() {
      return price;
    }
  
    public void setPrice(Float price) {
      this.price = price;
    }
  
    public String getDescription() {
      return description;
    }
  
    public void setDescription(String description) {
      this.description = description;
    }
  
    public String getIsbn() {
      return isbn;
    }
  
    public void setIsbn(String isbn) {
      this.isbn = isbn;
    }
  
    public Integer getNbOfPage() {
      return nbOfPage;
    }
  
    public void setNbOfPage(Integer nbOfPage) {
      this.nbOfPage = nbOfPage;
    }
  
    public Boolean getIllustrations() {
      return illustrations;
    }
  
    public void setIllustrations(Boolean illustrations) {
      this.illustrations = illustrations;
    }
  }