Package at.jku.dke.etutor.task_app.dto
Record Class SubmissionDto<T>
java.lang.Object
java.lang.Record
at.jku.dke.etutor.task_app.dto.SubmissionDto<T>
- Type Parameters:
T
- The type of the submission.- Record Components:
id
- The submission identifier.userId
- The user identifier.assignmentId
- The assignment identifier.taskId
- The task identifier.submissionTime
- The submission time.language
- The language of the submitters' user interface (either "de" or "en").feedbackLevel
- The feedback level.mode
- The submission mode.submission
- The submission.evaluationResult
- The result of the evaluation.
- All Implemented Interfaces:
Serializable
public record SubmissionDto<T>(@NotNull UUID id, @Size(max=255) String userId, @Size(max=255) String assignmentId, @jakarta.validation.constraints.NotNull long taskId, @NotNull @PastOrPresent Instant submissionTime, @NotNull @Size(min=2,max=2) @Pattern(regexp="de|en") String language, @jakarta.validation.constraints.NotNull,@jakarta.validation.constraints.Min(0L),@jakarta.validation.constraints.Max(3L) int feedbackLevel, @NotNull SubmissionMode mode, T submission, GradingDto evaluationResult)
extends Record
implements Serializable
Data transfer object for a persisted submission.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSubmissionDto
(@NotNull UUID id, @Size(max=255) String userId, @Size(max=255) String assignmentId, @jakarta.validation.constraints.NotNull long taskId, @NotNull @PastOrPresent Instant submissionTime, @NotNull @Size(min=2,max=2) @Pattern(regexp="de|en") String language, @jakarta.validation.constraints.NotNull,@jakarta.validation.constraints.Min(0L),@jakarta.validation.constraints.Max(3L) int feedbackLevel, @NotNull SubmissionMode mode, T submission, GradingDto evaluationResult) Creates an instance of aSubmissionDto
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theassignmentId
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of theevaluationResult
record component.@jakarta.validation.constraints.NotNull,@jakarta.validation.constraints.Min(0L),@jakarta.validation.constraints.Max(3L) int
Returns the value of thefeedbackLevel
record component.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.language()
Returns the value of thelanguage
record component.mode()
Returns the value of themode
record component.Returns the value of thesubmission
record component.Returns the value of thesubmissionTime
record component.@jakarta.validation.constraints.NotNull long
taskId()
Returns the value of thetaskId
record component.final String
toString()
Returns a string representation of this record class.userId()
Returns the value of theuserId
record component.
-
Constructor Details
-
SubmissionDto
public SubmissionDto(@NotNull @NotNull UUID id, @Size(max=255) @Size(max=255) String userId, @Size(max=255) @Size(max=255) String assignmentId, @NotNull @jakarta.validation.constraints.NotNull long taskId, @NotNull @PastOrPresent @NotNull @PastOrPresent Instant submissionTime, @NotNull @Size(min=2,max=2) @Pattern(regexp="de|en") @NotNull @Size(min=2,max=2) @Pattern(regexp="de|en") String language, @NotNull @Min(0L) @Max(3L) @jakarta.validation.constraints.NotNull,@jakarta.validation.constraints.Min(0L),@jakarta.validation.constraints.Max(3L) int feedbackLevel, @NotNull @NotNull SubmissionMode mode, @NotNull T submission, GradingDto evaluationResult) Creates an instance of aSubmissionDto
record class.- Parameters:
id
- the value for theid
record componentuserId
- the value for theuserId
record componentassignmentId
- the value for theassignmentId
record componenttaskId
- the value for thetaskId
record componentsubmissionTime
- the value for thesubmissionTime
record componentlanguage
- the value for thelanguage
record componentfeedbackLevel
- the value for thefeedbackLevel
record componentmode
- the value for themode
record componentsubmission
- the value for thesubmission
record componentevaluationResult
- the value for theevaluationResult
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
userId
Returns the value of theuserId
record component.- Returns:
- the value of the
userId
record component
-
assignmentId
Returns the value of theassignmentId
record component.- Returns:
- the value of the
assignmentId
record component
-
taskId
Returns the value of thetaskId
record component.- Returns:
- the value of the
taskId
record component
-
submissionTime
Returns the value of thesubmissionTime
record component.- Returns:
- the value of the
submissionTime
record component
-
language
@NotNull @Size(min=2, max=2) @Pattern(regexp="de|en") public @NotNull @Size(min=2,max=2) @Pattern(regexp="de|en") String language()Returns the value of thelanguage
record component.- Returns:
- the value of the
language
record component
-
feedbackLevel
@NotNull @Min(0L) @Max(3L) public @jakarta.validation.constraints.NotNull,@jakarta.validation.constraints.Min(0L),@jakarta.validation.constraints.Max(3L) int feedbackLevel()Returns the value of thefeedbackLevel
record component.- Returns:
- the value of the
feedbackLevel
record component
-
mode
Returns the value of themode
record component.- Returns:
- the value of the
mode
record component
-
submission
Returns the value of thesubmission
record component.- Returns:
- the value of the
submission
record component
-
evaluationResult
Returns the value of theevaluationResult
record component.- Returns:
- the value of the
evaluationResult
record component
-