Record Class GroupPermission
java.lang.Object
java.lang.Record
de.murmelmeister.murmelapi.group.permission.GroupPermission
public record GroupPermission(int groupId, String permission, LocalDateTime expiresAt, 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 LocalDateTimeThe field for theexpiresAtrecord component.private final intThe field for thegroupIdrecord component.private final StringThe field for thepermissionrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionGroupPermission(int groupId, String permission, LocalDateTime expiresAt, int createdBy, LocalDateTime createdAt, Integer changedBy, LocalDateTime changedAt) Creates an instance of aGroupPermissionrecord 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 theexpiresAtrecord component.intgroupId()Returns the value of thegroupIdrecord component.final inthashCode()Returns a hash code value for this object.booleanbooleanReturns the value of thepermissionrecord component.final StringtoString()Returns a string representation of this record class.withUpdateMeta(LocalDateTime expiresAt, Integer changedBy, LocalDateTime changedAt)
-
Field Details
-
groupId
private final int groupIdThe field for thegroupIdrecord component. -
permission
The field for thepermissionrecord component. -
expiresAt
The field for theexpiresAtrecord 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
-
GroupPermission
public GroupPermission(int groupId, String permission, LocalDateTime expiresAt, int createdBy, LocalDateTime createdAt, Integer changedBy, LocalDateTime changedAt) Creates an instance of aGroupPermissionrecord class.- Parameters:
groupId- the value for thegroupIdrecord componentpermission- the value for thepermissionrecord componentexpiresAt- the value for theexpiresAtrecord componentcreatedBy- the value for thecreatedByrecord componentcreatedAt- the value for thecreatedAtrecord componentchangedBy- the value for thechangedByrecord componentchangedAt- the value for thechangedAtrecord component
-
-
Method Details
-
isExpired
public boolean isExpired() -
isPermanent
public boolean isPermanent() -
withUpdateMeta
public GroupPermission withUpdateMeta(LocalDateTime expiresAt, 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 '=='. -
groupId
public int groupId()Returns the value of thegroupIdrecord component.- Returns:
- the value of the
groupIdrecord component
-
permission
Returns the value of thepermissionrecord component.- Returns:
- the value of the
permissionrecord component
-
expiresAt
Returns the value of theexpiresAtrecord component.- Returns:
- the value of the
expiresAtrecord 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
-