Class FeedbackScore

java.lang.Object
org.deltava.beans.FeedbackScore
All Implemented Interfaces:
Serializable, Cacheable

public class FeedbackScore extends Object implements Cacheable
A bean to store aggregated feedback.
Since:
11.6
Version:
11.6
Author:
Luke
See Also:
  • Method Details

    • getID

      public int getID()
      Returns the database ID of the parent object.
      Returns:
      the database ID
    • getType

      public String getType()
      Returns the type of the parent object.
      Returns:
      the type
    • getSize

      public int getSize()
      Returns the number of feedback entries.
      Returns:
      the number of entries
    • getAverage

      public double getAverage()
      Returns the average feedback score.
      Returns:
      the average score
    • toString

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

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

      public Object cacheKey()
      Description copied from interface: Cacheable
      Returns the cache key for this object. Caches call this method when adding the object.
      Specified by:
      cacheKey in interface Cacheable
      Returns:
      the cache key for the object
    • generate

      public static FeedbackScore generate(FeedbackBean fb)
      Generates a feedback score from a FeedbackBean.
      Parameters:
      fb - a FeedbackBean
      Returns:
      a FeedbackScore, or null if fb is empty