Record Class ChallengeConfigDTO
java.lang.Object
java.lang.Record
org.ntnu.idi.idatt2106.sparesti.sparestibackend.dto.config.ChallengeConfigDTO
- Record Components:
experience- Experiencemotivation- MotivationchallengeTypeConfigs- List of challenge type configs
- All Implemented Interfaces:
Serializable
public record ChallengeConfigDTO(@NotNull(message="Experience cannot be null") Experience experience, @NotNull(message="Motivation cannot be null") Motivation motivation, @NotNull(message="Challenge type configurations cannot be null") @Size(min=1,message="At least one challenge type configuration is required") Set<ChallengeTypeConfigDTO> challengeTypeConfigs)
extends Record
implements Serializable
DTO for
ChallengeConfig- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionChallengeConfigDTO(@NotNull(message="Experience cannot be null") Experience experience, @NotNull(message="Motivation cannot be null") Motivation motivation, @NotNull(message="Challenge type configurations cannot be null") @Size(min=1,message="At least one challenge type configuration is required") Set<ChallengeTypeConfigDTO> challengeTypeConfigs) Creates an instance of aChallengeConfigDTOrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull(message="Challenge type configurations cannot be null") @Size(min=1,message="At least one challenge type configuration is required") Set<ChallengeTypeConfigDTO> Returns the value of thechallengeTypeConfigsrecord component.final booleanIndicates whether some other object is "equal to" this one.@NotNull(message="Experience cannot be null") ExperienceReturns the value of theexperiencerecord component.final inthashCode()Returns a hash code value for this object.@NotNull(message="Motivation cannot be null") MotivationReturns the value of themotivationrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ChallengeConfigDTO
public ChallengeConfigDTO(@NotNull(message="Experience cannot be null") @NotNull(message="Experience cannot be null") Experience experience, @NotNull(message="Motivation cannot be null") @NotNull(message="Motivation cannot be null") Motivation motivation, @NotNull(message="Challenge type configurations cannot be null") @Size(min=1,message="At least one challenge type configuration is required") @NotNull(message="Challenge type configurations cannot be null") @Size(min=1,message="At least one challenge type configuration is required") Set<ChallengeTypeConfigDTO> challengeTypeConfigs) Creates an instance of aChallengeConfigDTOrecord class.- Parameters:
experience- the value for theexperiencerecord componentmotivation- the value for themotivationrecord componentchallengeTypeConfigs- the value for thechallengeTypeConfigsrecord 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). -
experience
@NotNull(message="Experience cannot be null") public @NotNull(message="Experience cannot be null") Experience experience()Returns the value of theexperiencerecord component.- Returns:
- the value of the
experiencerecord component
-
motivation
@NotNull(message="Motivation cannot be null") public @NotNull(message="Motivation cannot be null") Motivation motivation()Returns the value of themotivationrecord component.- Returns:
- the value of the
motivationrecord component
-
challengeTypeConfigs
@NotNull(message="Challenge type configurations cannot be null") @Size(min=1, message="At least one challenge type configuration is required") public @NotNull(message="Challenge type configurations cannot be null") @Size(min=1,message="At least one challenge type configuration is required") Set<ChallengeTypeConfigDTO> challengeTypeConfigs()Returns the value of thechallengeTypeConfigsrecord component.- Returns:
- the value of the
challengeTypeConfigsrecord component
-