Record Class Group

java.lang.Object
java.lang.Record
de.murmelmeister.murmelapi.group.Group

public record Group(int id, String groupName, int priority, boolean isDefault, int createdBy, LocalDateTime createdAt, Integer changedBy, LocalDateTime changedAt) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final LocalDateTime
    The field for the changedAt record component.
    private final Integer
    The field for the changedBy record component.
    private final LocalDateTime
    The field for the createdAt record component.
    private final int
    The field for the createdBy record component.
    private final String
    The field for the groupName record component.
    private final int
    The field for the id record component.
    private final boolean
    The field for the isDefault record component.
    private final int
    The field for the priority record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Group(int id, String groupName, int priority, boolean isDefault, int createdBy, LocalDateTime createdAt, Integer changedBy, LocalDateTime changedAt)
    Creates an instance of a Group record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the changedAt record component.
    Returns the value of the changedBy record component.
    Returns the value of the createdAt record component.
    int
    Returns the value of the createdBy record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the groupName record component.
    final int
    Returns a hash code value for this object.
    int
    id()
    Returns the value of the id record component.
    boolean
    Returns the value of the isDefault record component.
    int
    Returns the value of the priority record component.
    final String
    Returns a string representation of this record class.
    withUpdateMeta(String groupName, Integer priority, Integer changedBy, LocalDateTime changedAt)
     

    Methods inherited from class java.lang.Object

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

    • id

      private final int id
      The field for the id record component.
    • groupName

      private final String groupName
      The field for the groupName record component.
    • priority

      private final int priority
      The field for the priority record component.
    • isDefault

      private final boolean isDefault
      The field for the isDefault record component.
    • createdBy

      private final int createdBy
      The field for the createdBy record component.
    • createdAt

      private final LocalDateTime createdAt
      The field for the createdAt record component.
    • changedBy

      private final Integer changedBy
      The field for the changedBy record component.
    • changedAt

      private final LocalDateTime changedAt
      The field for the changedAt record component.
  • Constructor Details

    • Group

      public Group(int id, String groupName, int priority, boolean isDefault, int createdBy, LocalDateTime createdAt, Integer changedBy, LocalDateTime changedAt)
      Creates an instance of a Group record class.
      Parameters:
      id - the value for the id record component
      groupName - the value for the groupName record component
      priority - the value for the priority record component
      isDefault - the value for the isDefault record component
      createdBy - the value for the createdBy record component
      createdAt - the value for the createdAt record component
      changedBy - the value for the changedBy record component
      changedAt - the value for the changedAt record component
  • Method Details

    • withUpdateMeta

      public Group withUpdateMeta(String groupName, Integer priority, Integer changedBy, LocalDateTime changedAt)
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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 int id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • groupName

      public String groupName()
      Returns the value of the groupName record component.
      Returns:
      the value of the groupName record component
    • priority

      public int priority()
      Returns the value of the priority record component.
      Returns:
      the value of the priority record component
    • isDefault

      public boolean isDefault()
      Returns the value of the isDefault record component.
      Returns:
      the value of the isDefault record component
    • createdBy

      public int createdBy()
      Returns the value of the createdBy record component.
      Returns:
      the value of the createdBy record component
    • createdAt

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

      public Integer changedBy()
      Returns the value of the changedBy record component.
      Returns:
      the value of the changedBy record component
    • changedAt

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