Package at.jku.dke.etutor.task_app.dto
Record Class ModifyTaskDto<T>
java.lang.Object
java.lang.Record
at.jku.dke.etutor.task_app.dto.ModifyTaskDto<T>
- Type Parameters:
T
- The type of the additional data.- Record Components:
taskGroupId
- The task group id.maxPoints
- The maximum achievable points.taskType
- The task type.status
- The status.additionalData
- The task type specific data.
- All Implemented Interfaces:
Serializable
public record ModifyTaskDto<T>(Long taskGroupId, @NotNull @PositiveOrZero BigDecimal maxPoints, @NotEmpty @Size(max=100) String taskType, @NotNull TaskStatus status, T additionalData)
extends Record
implements Serializable
Data transfer object for creating and updating tasks.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionModifyTaskDto
(Long taskGroupId, @NotNull @PositiveOrZero BigDecimal maxPoints, @NotEmpty @Size(max=100) String taskType, @NotNull TaskStatus status, T additionalData) Creates an instance of aModifyTaskDto
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theadditionalData
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of themaxPoints
record component.status()
Returns the value of thestatus
record component.Returns the value of thetaskGroupId
record component.taskType()
Returns the value of thetaskType
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ModifyTaskDto
public ModifyTaskDto(Long taskGroupId, @NotNull @PositiveOrZero @NotNull @PositiveOrZero BigDecimal maxPoints, @NotEmpty @Size(max=100) @NotEmpty @Size(max=100) String taskType, @NotNull @NotNull TaskStatus status, @Valid @NotNull T additionalData) Creates an instance of aModifyTaskDto
record class.- Parameters:
taskGroupId
- the value for thetaskGroupId
record componentmaxPoints
- the value for themaxPoints
record componenttaskType
- the value for thetaskType
record componentstatus
- the value for thestatus
record componentadditionalData
- the value for theadditionalData
record component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
taskGroupId
Returns the value of thetaskGroupId
record component.- Returns:
- the value of the
taskGroupId
record component
-
maxPoints
Returns the value of themaxPoints
record component.- Returns:
- the value of the
maxPoints
record component
-
taskType
Returns the value of thetaskType
record component.- Returns:
- the value of the
taskType
record component
-
status
Returns the value of thestatus
record component.- Returns:
- the value of the
status
record component
-
additionalData
Returns the value of theadditionalData
record component.- Returns:
- the value of the
additionalData
record component
-