Package com.onec.ui.comments
Record Class Comment
java.lang.Object
java.lang.Record
com.onec.ui.comments.Comment
public record Comment(UUID id, String entityType, String entityName, UUID entityId, String authorId, String authorName, String body, LocalDateTime createdAt, LocalDateTime editedAt)
extends Record
One stored comment in the
onec_comments thread of a single entity. entityType
is the route kind ("catalogs"/"documents"), entityName the logical name
("Properties"), and entityId the target record — together they scope a thread.
authorId is the commenter's catalog record id when the login links to one (see
CurrentUserResolver); it is null for an unlinked principal, in which case
only authorName carries identity. editedAt is null until the comment is edited.-
Constructor Summary
ConstructorsConstructorDescriptionComment(UUID id, String entityType, String entityName, UUID entityId, String authorId, String authorName, String body, LocalDateTime createdAt, LocalDateTime editedAt) Creates an instance of aCommentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionauthorId()Returns the value of theauthorIdrecord component.Returns the value of theauthorNamerecord component.body()Returns the value of thebodyrecord component.Returns the value of thecreatedAtrecord component.editedAt()Returns the value of theeditedAtrecord component.entityId()Returns the value of theentityIdrecord component.Returns the value of theentityNamerecord component.Returns the value of theentityTyperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Comment
public Comment(UUID id, String entityType, String entityName, UUID entityId, String authorId, String authorName, String body, LocalDateTime createdAt, LocalDateTime editedAt) Creates an instance of aCommentrecord class.- Parameters:
id- the value for theidrecord componententityType- the value for theentityTyperecord componententityName- the value for theentityNamerecord componententityId- the value for theentityIdrecord componentauthorId- the value for theauthorIdrecord componentauthorName- the value for theauthorNamerecord componentbody- the value for thebodyrecord componentcreatedAt- the value for thecreatedAtrecord componenteditedAt- the value for theeditedAtrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
entityType
Returns the value of theentityTyperecord component.- Returns:
- the value of the
entityTyperecord component
-
entityName
Returns the value of theentityNamerecord component.- Returns:
- the value of the
entityNamerecord component
-
entityId
Returns the value of theentityIdrecord component.- Returns:
- the value of the
entityIdrecord component
-
authorId
Returns the value of theauthorIdrecord component.- Returns:
- the value of the
authorIdrecord component
-
authorName
Returns the value of theauthorNamerecord component.- Returns:
- the value of the
authorNamerecord component
-
body
Returns the value of thebodyrecord component.- Returns:
- the value of the
bodyrecord component
-
createdAt
Returns the value of thecreatedAtrecord component.- Returns:
- the value of the
createdAtrecord component
-
editedAt
Returns the value of theeditedAtrecord component.- Returns:
- the value of the
editedAtrecord component
-