Class Rating
java.lang.Object
org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementControlHeader
org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader
org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementBase
org.odpi.openmetadata.frameworks.connectors.properties.beans.Rating
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.
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected String
protected StarRating
protected String
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementBase
extendedProperties
Fields inherited from class org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementControlHeader
CURRENT_AUDIT_HEADER_VERSION
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Compare the values of the supplied object with those stored in the current object.boolean
Return if this rating is private ot the creating user.Return the review comments - null means no review is available.Return the stars for the rating.getUser()
Return the user id of the person who created the rating.int
hashCode()
Hash of propertiesvoid
setIsPublic
(boolean aPublic) Set up whether the rating is private to the creating user or not.void
Set up the review comments - null means no review is available.void
setStarRating
(StarRating starRating) Set up the stars for the rating.void
Set up the user id of the person who created the rating.toString()
Standard toString method.Methods inherited from class org.odpi.openmetadata.frameworks.connectors.properties.beans.ElementBase
getExtendedProperties, setExtendedProperties
Methods inherited from class org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementHeader
getClassifications, getGUID, setClassifications, setGUID
Methods inherited from class org.odpi.openmetadata.frameworks.openmetadata.metadataelements.ElementControlHeader
getHeaderVersion, getOrigin, getStatus, getType, getVersions, setHeaderVersion, setOrigin, setStatus, setType, setVersions
-
Field Details
-
starRating
-
review
-
user
-
isPublic
protected boolean isPublic
-
-
Constructor Details
-
Rating
public Rating()Default constructor -
Rating
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
Return the stars for the rating.- Returns:
- StarRating enum
-
setStarRating
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
-
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
Standard toString method.- Overrides:
toString
in classElementBase
- 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:
equals
in classElementBase
- Parameters:
objectToCompare
- supplied object- Returns:
- boolean result of comparison
-
hashCode
public int hashCode()Hash of properties- Overrides:
hashCode
in classElementBase
- Returns:
- int
-