Class Rating
- java.lang.Object
-
- org.odpi.openmetadata.frameworks.connectors.properties.beans.PropertyBase
-
- org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementControlHeader
-
- org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader
-
- org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementBase
-
- org.odpi.openmetadata.frameworks.connectors.properties.beans.Rating
-
- All Implemented Interfaces:
Serializable
public class Rating extends ElementBase
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
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanisPublicprotected Stringreviewprotected StarRatingstarRatingprotected Stringuser-
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementBase
extendedProperties, url
-
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.properties.beans.PropertyBase
CURRENT_AUDIT_HEADER_VERSION
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object objectToCompare)Compare the values of the supplied object with those stored in the current object.booleangetIsPublic()Return if this rating is private ot the creating user.StringgetReview()Return the review comments - null means no review is available.StarRatinggetStarRating()Return the stars for the rating.StringgetUser()Return the user id of the person who created the rating.inthashCode()Hash of propertiesvoidsetIsPublic(boolean aPublic)Set up whether the rating is private to the creating user or not.voidsetReview(String review)Set up the review comments - null means no review is available.voidsetStarRating(StarRating starRating)Set up the stars for the rating.voidsetUser(String user)Set up the user id of the person who created the rating.StringtoString()Standard toString method.-
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementBase
getExtendedProperties, getURL, setExtendedProperties, setURL
-
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementHeader
getClassifications, getGUID, setClassifications, setGUID
-
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementControlHeader
getOrigin, getStatus, getType, getVersions, setOrigin, setStatus, setType, setVersions
-
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.properties.beans.PropertyBase
getHeaderVersion, setHeaderVersion
-
-
-
-
Field Detail
-
starRating
protected StarRating starRating
-
review
protected String review
-
user
protected String user
-
isPublic
protected boolean isPublic
-
-
Constructor Detail
-
Rating
public Rating()
Default constructor
-
Rating
public Rating(Rating template)
Copy/clone constructor.- Parameters:
template- element to copy
-
-
Method Detail
-
getUser
public 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(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 String getReview()
Return the review comments - null means no review is available.- Returns:
- String review comments
-
setReview
public void setReview(String review)
Set up the review comments - null means no review is available.- Parameters:
review- String review comments
-
getIsPublic
public boolean getIsPublic()
Return if this rating is private ot the creating user.- Returns:
- boolean
-
setIsPublic
public void setIsPublic(boolean aPublic)
Set up whether the rating is private to the creating user or not.- Parameters:
aPublic- boolean
-
toString
public String toString()
Standard toString method.- Overrides:
toStringin classElementBase- Returns:
- print out of variables in a JSON-style
-
equals
public boolean equals(Object objectToCompare)
Compare the values of the supplied object with those stored in the current object.- Overrides:
equalsin classElementBase- Parameters:
objectToCompare- supplied object- Returns:
- boolean result of comparison
-
hashCode
public int hashCode()
Hash of properties- Overrides:
hashCodein classElementBase- Returns:
- int
-
-