Class Feedback

All Implemented Interfaces:
Serializable, Comparable<Object>, AuthoredBean, IDBean, ViewEntry, Cacheable

public class Feedback extends DatabaseBean implements AuthoredBean, ViewEntry
A bean to store feedback about a particular item.
Since:
11.6
Version:
11.6
Author:
Luke
See Also:
  • Constructor Details

    • Feedback

      public Feedback(int id, Class<?> c)
      Creates the bean.
      Parameters:
      id - the database ID of the feedback item
      c - the feedback item class
  • Method Details

    • getAuthorID

      public int getAuthorID()
      Description copied from interface: AuthoredBean
      Returns the Author of this bean.
      Specified by:
      getAuthorID in interface AuthoredBean
      Returns:
      the author's database ID
      See Also:
    • getType

      public String getType()
      Returns the feedback item type.
      Returns:
      the type
    • getCreatedOn

      public Instant getCreatedOn()
      Returns the feedback date.
      Returns:
      the date/time the feedback was received
    • getScore

      public int getScore()
      Returns the feedback score.
      Returns:
      the score from 0 to 10
    • getComments

      public String getComments()
      Returns the feedback comments.
      Returns:
      the comments
    • setAuthorID

      public void setAuthorID(int id)
      Description copied from interface: AuthoredBean
      Updates the author of this bean.
      Specified by:
      setAuthorID in interface AuthoredBean
      Parameters:
      id - the author's database ID.
      See Also:
    • setCreatedOn

      public void setCreatedOn(Instant dt)
      Updates the feedback date.
      Parameters:
      dt - the date/time the feedback was received
    • setComments

      public void setComments(String comments)
      Updates the feedback comments.
      Parameters:
      comments - the comments
    • setScore

      public void setScore(int s)
      Updates the score.
      Parameters:
      s - a score between 0 and 10
    • getRowClassName

      public String getRowClassName()
      Description copied from interface: ViewEntry
      Returns the CSS class for this object if rendered in a view table.
      Specified by:
      getRowClassName in interface ViewEntry
      Returns:
      the CSS class name, or NULL if none
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object