Package de.murmelmeister.murmelapi.group
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
FieldsModifier and TypeFieldDescriptionprivate final LocalDateTimeThe field for thechangedAtrecord component.private final IntegerThe field for thechangedByrecord component.private final LocalDateTimeThe field for thecreatedAtrecord component.private final intThe field for thecreatedByrecord component.private final StringThe field for thegroupNamerecord component.private final intThe field for theidrecord component.private final booleanThe field for theisDefaultrecord component.private final intThe field for thepriorityrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionGroup(int id, String groupName, int priority, boolean isDefault, int createdBy, LocalDateTime createdAt, Integer changedBy, LocalDateTime changedAt) Creates an instance of aGrouprecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thechangedAtrecord component.Returns the value of thechangedByrecord component.Returns the value of thecreatedAtrecord component.intReturns the value of thecreatedByrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegroupNamerecord component.final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.booleanReturns the value of theisDefaultrecord component.intpriority()Returns the value of thepriorityrecord component.final StringtoString()Returns a string representation of this record class.withUpdateMeta(String groupName, Integer priority, Integer changedBy, LocalDateTime changedAt)
-
Field Details
-
id
private final int idThe field for theidrecord component. -
groupName
The field for thegroupNamerecord component. -
priority
private final int priorityThe field for thepriorityrecord component. -
isDefault
private final boolean isDefaultThe field for theisDefaultrecord component. -
createdBy
private final int createdByThe field for thecreatedByrecord component. -
createdAt
The field for thecreatedAtrecord component. -
changedBy
The field for thechangedByrecord component. -
changedAt
The field for thechangedAtrecord 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 aGrouprecord class.- Parameters:
id- the value for theidrecord componentgroupName- the value for thegroupNamerecord componentpriority- the value for thepriorityrecord componentisDefault- the value for theisDefaultrecord componentcreatedBy- the value for thecreatedByrecord componentcreatedAt- the value for thecreatedAtrecord componentchangedBy- the value for thechangedByrecord componentchangedAt- the value for thechangedAtrecord component
-
-
Method Details
-
withUpdateMeta
public Group withUpdateMeta(String groupName, Integer priority, Integer changedBy, LocalDateTime changedAt) -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
public int id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
groupName
Returns the value of thegroupNamerecord component.- Returns:
- the value of the
groupNamerecord component
-
priority
public int priority()Returns the value of thepriorityrecord component.- Returns:
- the value of the
priorityrecord component
-
isDefault
public boolean isDefault()Returns the value of theisDefaultrecord component.- Returns:
- the value of the
isDefaultrecord component
-
createdBy
public int createdBy()Returns the value of thecreatedByrecord component.- Returns:
- the value of the
createdByrecord component
-
createdAt
Returns the value of thecreatedAtrecord component.- Returns:
- the value of the
createdAtrecord component
-
changedBy
Returns the value of thechangedByrecord component.- Returns:
- the value of the
changedByrecord component
-
changedAt
Returns the value of thechangedAtrecord component.- Returns:
- the value of the
changedAtrecord component
-