Class RatingRequestBody
java.lang.Object
org.odpi.openmetadata.accessservices.assetconsumer.rest.AssetConsumerOMASAPIRequestBody
org.odpi.openmetadata.accessservices.assetconsumer.rest.FeedbackRequestBody
org.odpi.openmetadata.accessservices.assetconsumer.rest.RatingRequestBody
- All Implemented Interfaces:
Serializable
RatingRequestBody 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:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorRatingRequestBody(RatingRequestBody template) Copy/clone constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompare the values of the supplied object with those stored in the current object.Return the review comments - null means no review is available.org.odpi.openmetadata.frameworks.connectors.properties.beans.StarRatingReturn the stars for the rating.getUser()Return the user id of the person who created the rating.inthashCode()Return hash code for this objectvoidSet up the review comments - null means no review is available.voidsetStarRating(org.odpi.openmetadata.frameworks.connectors.properties.beans.StarRating starRating) Set up the stars for the rating.voidSet up the user id of the person who created the rating.toString()Standard toString method.Methods inherited from class org.odpi.openmetadata.accessservices.assetconsumer.rest.FeedbackRequestBody
getIsPublic, setIsPublic
-
Constructor Details
-
RatingRequestBody
public RatingRequestBody()Default constructor -
RatingRequestBody
Copy/clone constructor.- Parameters:
template- element to copy
-
-
Method Details
-
getUser
Return the user id of the person who created the rating. Null means the user id is not known.- Returns:
- String user
-
setUser
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 org.odpi.openmetadata.frameworks.connectors.properties.beans.StarRating getStarRating()Return the stars for the rating.- Returns:
- StarRating enum
-
setStarRating
public void setStarRating(org.odpi.openmetadata.frameworks.connectors.properties.beans.StarRating starRating) Set up the stars for the rating.- Parameters:
starRating- StarRating enum
-
getReview
Return the review comments - null means no review is available.- Returns:
- String review comments
-
setReview
Set up the review comments - null means no review is available.- Parameters:
review- String review comments
-
toString
Standard toString method.- Overrides:
toStringin classFeedbackRequestBody- Returns:
- print out of variables in a JSON-style
-
equals
Compare the values of the supplied object with those stored in the current object.- Overrides:
equalsin classFeedbackRequestBody- Parameters:
objectToCompare- supplied object- Returns:
- boolean result of comparison
-
hashCode
public int hashCode()Return hash code for this object- Overrides:
hashCodein classFeedbackRequestBody- Returns:
- int hash code
-