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 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 a Comment record class.
      Parameters:
      id - the value for the id record component
      entityType - the value for the entityType record component
      entityName - the value for the entityName record component
      entityId - the value for the entityId record component
      authorId - the value for the authorId record component
      authorName - the value for the authorName record component
      body - the value for the body record component
      createdAt - the value for the createdAt record component
      editedAt - the value for the editedAt record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public UUID id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • entityType

      public String entityType()
      Returns the value of the entityType record component.
      Returns:
      the value of the entityType record component
    • entityName

      public String entityName()
      Returns the value of the entityName record component.
      Returns:
      the value of the entityName record component
    • entityId

      public UUID entityId()
      Returns the value of the entityId record component.
      Returns:
      the value of the entityId record component
    • authorId

      public String authorId()
      Returns the value of the authorId record component.
      Returns:
      the value of the authorId record component
    • authorName

      public String authorName()
      Returns the value of the authorName record component.
      Returns:
      the value of the authorName record component
    • body

      public String body()
      Returns the value of the body record component.
      Returns:
      the value of the body record component
    • createdAt

      public LocalDateTime createdAt()
      Returns the value of the createdAt record component.
      Returns:
      the value of the createdAt record component
    • editedAt

      public LocalDateTime editedAt()
      Returns the value of the editedAt record component.
      Returns:
      the value of the editedAt record component