Package at.jku.dke.etutor.task_app.dto
Record Class SubmitSubmissionDto<T>
java.lang.Object
java.lang.Record
at.jku.dke.etutor.task_app.dto.SubmitSubmissionDto<T>
- Type Parameters:
T
- The type of the submission.- Record Components:
userId
- The user identifier (can be used e.g. for plagiarism check).assignmentId
- The assignment identifier (can be used e.g. for plagiarism check).taskId
- The task identifier.language
- The language of the submitters' user interface (either "de" or "en").mode
- The submission mode.feedbackLevel
- The feedback level.submission
- The submission.
- All Implemented Interfaces:
Serializable
public record SubmitSubmissionDto<T>(@Size(max=255) String userId, @Size(max=255) String assignmentId, @NotNull Long taskId, @NotNull @Size(min=2,max=2) @Pattern(regexp="de|en") String language, @NotNull SubmissionMode mode, @NotNull @Min(0L) @Max(3L) Integer feedbackLevel, T submission)
extends Record
implements Serializable
Data transfer object for submitting a submission.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSubmitSubmissionDto
(@Size(max=255) String userId, @Size(max=255) String assignmentId, @NotNull Long taskId, @NotNull @Size(min=2,max=2) @Pattern(regexp="de|en") String language, @NotNull SubmissionMode mode, @NotNull @Min(0L) @Max(3L) Integer feedbackLevel, T submission) Creates an instance of aSubmitSubmissionDto
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 thefeedbackLevel
record component.final int
hashCode()
Returns a hash code value for this object.language()
Returns the value of thelanguage
record component.mode()
Returns the value of themode
record component.Returns the value of thesubmission
record component.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
-
SubmitSubmissionDto
public SubmitSubmissionDto(@Size(max=255) @Size(max=255) String userId, @Size(max=255) @Size(max=255) String assignmentId, @NotNull @NotNull Long taskId, @NotNull @Size(min=2,max=2) @Pattern(regexp="de|en") @NotNull @Size(min=2,max=2) @Pattern(regexp="de|en") String language, @NotNull @NotNull SubmissionMode mode, @NotNull @Min(0L) @Max(3L) @NotNull @Min(0L) @Max(3L) Integer feedbackLevel, @NotNull @Valid T submission) Creates an instance of aSubmitSubmissionDto
record class.- Parameters:
userId
- the value for theuserId
record componentassignmentId
- the value for theassignmentId
record componenttaskId
- the value for thetaskId
record componentlanguage
- the value for thelanguage
record componentmode
- the value for themode
record componentfeedbackLevel
- the value for thefeedbackLevel
record componentsubmission
- the value for thesubmission
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)
. -
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
-
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
-
mode
Returns the value of themode
record component.- Returns:
- the value of the
mode
record component
-
feedbackLevel
Returns the value of thefeedbackLevel
record component.- Returns:
- the value of the
feedbackLevel
record component
-
submission
Returns the value of thesubmission
record component.- Returns:
- the value of the
submission
record component
-