Class AssetRating
- java.lang.Object
-
- org.odpi.openmetadata.frameworks.connectors.properties.AssetPropertyElementBase
-
- org.odpi.openmetadata.frameworks.connectors.properties.AssetPropertyBase
-
- org.odpi.openmetadata.frameworks.connectors.properties.AssetElementHeader
-
- org.odpi.openmetadata.frameworks.connectors.properties.AssetRating
-
- All Implemented Interfaces:
Serializable
public class AssetRating extends AssetElementHeader
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 RatingratingBean-
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.properties.AssetPropertyBase
parentAsset
-
-
Constructor Summary
Constructors Constructor Description AssetRating(AssetDescriptor parentAsset, AssetRating templateRating)Copy/clone constructor.AssetRating(AssetDescriptor parentAsset, Rating ratingBean)Bean constructor with parent assetAssetRating(Rating ratingBean)Bean constructor
-
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.protected RatinggetRatingBean()Return the bean with all of the properties.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 propertiesbooleanisPublic()Return if this rating is private to the creating user.StringtoString()Standard toString method.-
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.properties.AssetElementHeader
getAssetClassifications, getElementHeaderBean, getExtendedProperties, getGUID, getType, getURL, setBean
-
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.properties.AssetPropertyBase
getParentAsset, getParentAssetName, getParentAssetTypeName
-
-
-
-
Field Detail
-
ratingBean
protected Rating ratingBean
-
-
Constructor Detail
-
AssetRating
public AssetRating(Rating ratingBean)
Bean constructor- Parameters:
ratingBean- bean containing all of the properties
-
AssetRating
public AssetRating(AssetDescriptor parentAsset, Rating ratingBean)
Bean constructor with parent asset- Parameters:
parentAsset- descriptor for parent assetratingBean- bean containing all of the properties
-
AssetRating
public AssetRating(AssetDescriptor parentAsset, AssetRating templateRating)
Copy/clone constructor.- Parameters:
parentAsset- descriptor for parent assettemplateRating- element to copy
-
-
Method Detail
-
getRatingBean
protected Rating getRatingBean()
Return the bean with all of the properties.- Returns:
- rating bean
-
isPublic
public boolean isPublic()
Return if this rating is private to the creating user.- Returns:
- boolean
-
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
-
getStarRating
public StarRating getStarRating()
Return the stars for the rating.- Returns:
- StarRating starRating
-
getReview
public String getReview()
Return the review comments - null means no review is available.- Returns:
- String review comments
-
toString
public String toString()
Standard toString method.- Overrides:
toStringin classAssetElementHeader- 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 classAssetElementHeader- Parameters:
objectToCompare- supplied object- Returns:
- boolean result of comparison
-
hashCode
public int hashCode()
Hash of properties- Overrides:
hashCodein classAssetElementHeader- Returns:
- int
-
-