Class Book

java.lang.Object
io.micronaut.coherence.data.model.Book
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
MutationsBook

@MappedEntity public class Book extends Object implements Serializable
An entity for representing a book.
See Also:
  • Field Details

    • uuid

      @Id protected final com.tangosol.util.UUID uuid
      The unique id of this book.
    • title

      protected final String title
      The title of the book.
    • author

      protected final Author author
      The author of the book.
    • pages

      protected int pages
      The number of pages the book has.
    • published

      protected final Calendar published
      The book's publication date.
  • Constructor Details

    • Book

      @Creator public Book(String title, int pages, Author author, Calendar published)
      Constructs a new Book.
      Parameters:
      title - the book's title
      pages - the number of pages the book has
      author - the book's author
      published - the book's publication date
    • Book

      public Book(Book copy)
  • Method Details

    • getUuid

      public com.tangosol.util.UUID getUuid()
      Return this book's unique UUID.
      Returns:
      this book's unique UUID
    • getTitle

      public String getTitle()
      Return this book's title.
      Returns:
      this book's title
    • getAuthor

      public Author getAuthor()
      Return this book's author.
      Returns:
      this book's author
    • getPages

      public int getPages()
      Returns the number of pages in this book.
      Returns:
      the number of pages in this book
    • setPages

      public void setPages(int pages)
      Set the number of pages in this book.
      Parameters:
      pages - the new value for the page count
    • getPublicationYear

      public int getPublicationYear()
      Returns the year this book was published.
      Returns:
      the year this book was published
    • getPublished

      public Calendar getPublished()
      Returns a Calendar representing the publication date of the book.
      Returns:
      a Calendar representing the publication date of the book
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object