Record Class Comment

java.lang.Object
java.lang.Record
io.vertigo.social.comment.Comment

public record Comment(UUID uuid, io.vertigo.datamodel.data.model.UID<io.vertigo.account.account.Account> author, String authorDisplayName, String msg, Instant creationDate, Instant lastModified) extends Record
Author:
pchretien
  • Constructor Summary

    Constructors
    Constructor
    Description
    Comment(UUID uuid, io.vertigo.datamodel.data.model.UID<io.vertigo.account.account.Account> author, String authorDisplayName, String msg, Instant creationDate, Instant lastModified)
    Creates an instance of a Comment record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    io.vertigo.datamodel.data.model.UID<io.vertigo.account.account.Account>
    Returns the value of the author record component.
    Returns the value of the authorDisplayName record component.
    Static method factory for CommentBuilder
    Returns the value of the creationDate record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the lastModified record component.
    msg()
    Returns the value of the msg record component.
    final String
    Returns a string representation of this record class.
    Returns the value of the uuid record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Comment

      public Comment(UUID uuid, io.vertigo.datamodel.data.model.UID<io.vertigo.account.account.Account> author, String authorDisplayName, String msg, Instant creationDate, Instant lastModified)
      Creates an instance of a Comment record class.
      Parameters:
      uuid - the value for the uuid record component
      author - the value for the author record component
      authorDisplayName - the value for the authorDisplayName record component
      msg - the value for the msg record component
      creationDate - the value for the creationDate record component
      lastModified - the value for the lastModified record component
  • Method Details

    • builder

      public static CommentBuilder builder()
      Static method factory for CommentBuilder
      Returns:
      CommentBuilder
    • 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.
    • uuid

      public UUID uuid()
      Returns the value of the uuid record component.
      Returns:
      the value of the uuid record component
    • author

      public io.vertigo.datamodel.data.model.UID<io.vertigo.account.account.Account> author()
      Returns the value of the author record component.
      Returns:
      the value of the author record component
    • authorDisplayName

      public String authorDisplayName()
      Returns the value of the authorDisplayName record component.
      Returns:
      the value of the authorDisplayName record component
    • msg

      public String msg()
      Returns the value of the msg record component.
      Returns:
      the value of the msg record component
    • creationDate

      public Instant creationDate()
      Returns the value of the creationDate record component.
      Returns:
      the value of the creationDate record component
    • lastModified

      public Instant lastModified()
      Returns the value of the lastModified record component.
      Returns:
      the value of the lastModified record component