Class AssetComment
- 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.AssetComment
-
- All Implemented Interfaces:
Serializable
public class AssetComment extends AssetElementHeader
Stores information about a comment connected to an asset. Comments provide informal feedback to assets and can be added at any time. Comments have the userId of the person who added the feedback, along with their comment text. Comments can have other comments attached. The content of the comment is a personal statement (which is why the user's id is in the comment) and there is no formal review of the content.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected CommentcommentBeanprotected AssetCommentRepliescommentReplies-
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.properties.AssetPropertyBase
parentAsset
-
-
Constructor Summary
Constructors Constructor Description AssetComment(AssetDescriptor parentAsset, AssetComment templateComment)Copy/clone constructor.AssetComment(AssetDescriptor parentAsset, Comment commentBean, AssetCommentReplies commentReplies)Bean constructor with parent asset and repliesAssetComment(Comment commentBean, AssetCommentReplies commentReplies)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 CommentgetCommentBean()Return the bean with all of the properties.AssetCommentRepliesgetCommentReplies()Return an iterator of the replies to this comment - null means no replies are available.StringgetCommentText()Return the comment text.CommentTypegetCommentType()Return an enum that describes the type of comment.StringgetUser()Return the user id of the person who created the comment.inthashCode()Hash of propertiesbooleanisPublic()Return if this comment 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
-
commentBean
protected Comment commentBean
-
commentReplies
protected AssetCommentReplies commentReplies
-
-
Constructor Detail
-
AssetComment
public AssetComment(Comment commentBean, AssetCommentReplies commentReplies)
Bean constructor- Parameters:
commentBean- bean that contains all of the propertiescommentReplies- any replies to this comment
-
AssetComment
public AssetComment(AssetDescriptor parentAsset, Comment commentBean, AssetCommentReplies commentReplies)
Bean constructor with parent asset and replies- Parameters:
parentAsset- descriptor for parent assetcommentBean- bean that contains all of the propertiescommentReplies- any replies to this comment
-
AssetComment
public AssetComment(AssetDescriptor parentAsset, AssetComment templateComment)
Copy/clone constructor.- Parameters:
parentAsset- descriptor for parent assettemplateComment- element to copy
-
-
Method Detail
-
getCommentBean
protected Comment getCommentBean()
Return the bean with all of the properties.- Returns:
- Comment bean
-
isPublic
public boolean isPublic()
Return if this comment is private to the creating user.- Returns:
- boolean
-
getCommentType
public CommentType getCommentType()
Return an enum that describes the type of comment.- Returns:
- CommentType enum
-
getUser
public String getUser()
Return the user id of the person who created the comment. Null means the user id is not known.- Returns:
- String commenting user
-
getCommentText
public String getCommentText()
Return the comment text.- Returns:
- String commentText
-
getCommentReplies
public AssetCommentReplies getCommentReplies()
Return an iterator of the replies to this comment - null means no replies are available.- Returns:
- comment replies iterator
-
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
-
-