package cz.muni.fi.pa165.entity;

public class Book {

    public Book() {
    }

}

@@ -31,54 +31,2454 @@
 y;%0A%0A
-public class Book %7B%0A%0A    public Book() %7B%0A    %7D%0A
+import javax.persistence.Column;%0Aimport javax.persistence.Entity;%0Aimport javax.persistence.Id;%0A%0A/**%0A * Entity representing a single book in a library%0A *%0A * @author Michael Simacek%0A *%0A */%0A@Entity%0Apublic class Book %7B%0A%0A    @Id%0A    private Long id;%0A%0A    @Column(nullable = false)%0A    private String name;%0A%0A    @Column(nullable = false)%0A    private String authorName;%0A%0A    @Column(nullable = false)%0A    private Long isbn;%0A%0A    @Column(nullable = false)%0A    private BookState state;%0A%0A    public Long getId() %7B%0A        return id;%0A    %7D%0A%0A    public void setId(Long id) %7B%0A        this.id = id;%0A    %7D%0A%0A    public String getName() %7B%0A        return name;%0A    %7D%0A%0A    public void setName(String name) %7B%0A        this.name = name;%0A    %7D%0A%0A    public String getAuthorName() %7B%0A        return authorName;%0A    %7D%0A%0A    public void setAuthorName(String authorName) %7B%0A        this.authorName = authorName;%0A    %7D%0A%0A    public Long getIsbn() %7B%0A        return isbn;%0A    %7D%0A%0A    public void setIsbn(Long isbn) %7B%0A        this.isbn = isbn;%0A    %7D%0A%0A    public BookState getState() %7B%0A        return state;%0A    %7D%0A%0A    public void setState(BookState state) %7B%0A        this.state = state;%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        final int prime = 31;%0A        int result = 1;%0A        result = prime * result%0A                + ((authorName == null) ? 0 : authorName.hashCode());%0A        result = prime * result + ((isbn == null) ? 0 : isbn.hashCode());%0A        result = prime * result + ((name == null) ? 0 : name.hashCode());%0A        return result;%0A    %7D%0A%0A    @Override%0A    public boolean equals(Object obj) %7B%0A        if (this == obj) %7B%0A            return true;%0A        %7D%0A        if (obj == null) %7B%0A            return false;%0A        %7D%0A        if (!(obj instanceof Book)) %7B%0A            return false;%0A        %7D%0A        Book other = (Book) obj;%0A        if (authorName == null) %7B%0A            if (other.authorName != null) %7B%0A                return false;%0A            %7D%0A        %7D else if (!authorName.equals(other.authorName)) %7B%0A            return false;%0A        %7D%0A        if (isbn == null) %7B%0A            if (other.isbn != null) %7B%0A                return false;%0A            %7D%0A        %7D else if (!isbn.equals(other.isbn)) %7B%0A            return false;%0A        %7D%0A        if (name == null) %7B%0A            if (other.name != null) %7B%0A                return false;%0A            %7D%0A        %7D else if (!name.equals(other.name)) %7B%0A            return false;%0A        %7D%0A        return true;%0A    %7D
 %0A%7D%0A

Create Book entity