Class RatingProperties

  • All Implemented Interfaces:
    java.io.Serializable

    public class RatingProperties
    extends java.lang.Object
    implements java.io.Serializable
    RatingProperties stores information about a rating connected to an asset. Ratings provide informal feedback on the quality of assets and can be added at any time. Ratings have the userId of the person who added it, a star rating and an optional review comment. The content of the rating is a personal judgement (which is why the user's id is in the object) and there is no formal review of the ratings. However, they can be used as a basis for crowd-sourcing feedback to asset owners.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object objectToCompare)
      Compare the values of the supplied object with those stored in the current object.
      java.lang.String getReview()
      Return the review comments - null means no review is available.
      StarRating getStarRating()
      Return the stars for the rating.
      java.lang.String getUser()
      Return the user id of the person who created the rating.
      int hashCode()
      Return hash code for this object
      boolean isPublic()
      Return if this rating is private ot the creating user.
      void setPublic​(boolean aPublic)
      Set up whether the rating is private to the creating user or not.
      void setReview​(java.lang.String review)
      Set up the review comments - null means no review is available.
      void setStarRating​(StarRating starRating)
      Set up the stars for the rating.
      void setUser​(java.lang.String user)
      Set up the user id of the person who created the rating.
      java.lang.String toString()
      Standard toString method.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • RatingProperties

        public RatingProperties()
        Default constructor
      • RatingProperties

        public RatingProperties​(RatingProperties template)
        Copy/clone constructor.
        Parameters:
        template - element to copy
    • Method Detail

      • getUser

        public java.lang.String getUser()
        Return the user id of the person who created the rating. Null means the user id is not known.
        Returns:
        String user
      • setUser

        public void setUser​(java.lang.String user)
        Set up the user id of the person who created the rating. Null means the user id is not known.
        Parameters:
        user - string
      • getStarRating

        public StarRating getStarRating()
        Return the stars for the rating.
        Returns:
        StarRating enum
      • setStarRating

        public void setStarRating​(StarRating starRating)
        Set up the stars for the rating.
        Parameters:
        starRating - StarRating enum
      • getReview

        public java.lang.String getReview()
        Return the review comments - null means no review is available.
        Returns:
        String review comments
      • setReview

        public void setReview​(java.lang.String review)
        Set up the review comments - null means no review is available.
        Parameters:
        review - String review comments
      • isPublic

        public boolean isPublic()
        Return if this rating is private ot the creating user.
        Returns:
        boolean
      • setPublic

        public void setPublic​(boolean aPublic)
        Set up whether the rating is private to the creating user or not.
        Parameters:
        aPublic - boolean
      • toString

        public java.lang.String toString()
        Standard toString method.
        Overrides:
        toString in class java.lang.Object
        Returns:
        print out of variables in a JSON-style
      • equals

        public boolean equals​(java.lang.Object objectToCompare)
        Compare the values of the supplied object with those stored in the current object.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        objectToCompare - supplied object
        Returns:
        boolean result of comparison
      • hashCode

        public int hashCode()
        Return hash code for this object
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        int hash code