Class BookDetailsImpl


  • public class BookDetailsImpl
    extends Object
    Bean representing a single book with public read access to all fields. Immutable, once created none of the fields can be changed any more.
    Author:
    Maximilian Schiedermeier
    • Constructor Detail

      • BookDetailsImpl

        public BookDetailsImpl()
        Default constructor. Only required to support json deserialization without reflective voodoo like e.g. objenesis.
      • BookDetailsImpl

        public BookDetailsImpl​(long isbn,
                               String title,
                               String author,
                               int priceInCents,
                               String bookAbstract)
        Fully parameterized constructor. Use this one instead of the default constructor to populate a book object upon creation.
        Parameters:
        isbn - as the isbn of the book.
        title - as the title of the book.
        author - as the author of the book.
        priceInCents - as the price in canadian cents of the book.
        bookAbstract - as the abstract of the book.
    • Method Detail

      • getIsbn

        public long getIsbn()
        Getter for isbn number of book.
        Returns:
        the isbn number as a long.
      • getTitle

        public String getTitle()
        Getter for the book's title.
        Returns:
        the books title as a String.
      • getAuthor

        public String getAuthor()
        Getter for the author of the book.
        Returns:
        the authors name as String.
      • getPriceInCents

        public int getPriceInCents()
        Getter for the book's price in canadian cents.
        Returns:
        the book price in canadian cents.
      • getBookAbstract

        public String getBookAbstract()
        Getter for the book's abstract desription.
        Returns:
        the book's abstract as string.
      • toString

        public String toString()
        Converts the book detail fields to a human readable String.
        Overrides:
        toString in class Object
        Returns:
        all fields formatted human readable string.