Record Class MealRequestDTO
java.lang.Object
java.lang.Record
br.com.receitaquedoimenos.ReceitaQueDoiMenos.models.meal.MealRequestDTO
- Record Components:
name- String referente ao nometypeMeal- Enum referente ao tipo da refeiçãophotoURL- String URL de uma imagemvideoURL- String URL de um vÃdeoingredients- ArrayList contendo os ingredientesinstructions- String referente ao modo de preparocreatorID- String referente ao criador da refeição
public record MealRequestDTO(@NotBlank String name, @NotNull TypeMeal typeMeal, String photoURL, String videoURL, @NotNull ArrayList<String> ingredients, @NotBlank String instructions, @NotBlank String creatorID)
extends Record
Informações referentes a um drink criados ou atualizados requeridos dentro do sistema
- Author:
- Pedro Henrique Pereira de Oliveira
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotBlank StringReturns the value of thecreatorIDrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theingredientsrecord component.@NotBlank StringReturns the value of theinstructionsrecord component.@NotBlank Stringname()Returns the value of thenamerecord component.photoURL()Returns the value of thephotoURLrecord component.final StringtoString()Returns a string representation of this record class.@NotNull TypeMealtypeMeal()Returns the value of thetypeMealrecord component.videoURL()Returns the value of thevideoURLrecord component.
-
Constructor Details
-
MealRequestDTO
public MealRequestDTO(@NotBlank @NotBlank String name, @NotNull @NotNull TypeMeal typeMeal, String photoURL, String videoURL, @NotNull @NotNull ArrayList<String> ingredients, @NotBlank @NotBlank String instructions, @NotBlank @NotBlank String creatorID) Creates an instance of aMealRequestDTOrecord class.- Parameters:
name- the value for thenamerecord componenttypeMeal- the value for thetypeMealrecord componentphotoURL- the value for thephotoURLrecord componentvideoURL- the value for thevideoURLrecord componentingredients- the value for theingredientsrecord componentinstructions- the value for theinstructionsrecord componentcreatorID- the value for thecreatorIDrecord 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). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
typeMeal
Returns the value of thetypeMealrecord component.- Returns:
- the value of the
typeMealrecord component
-
photoURL
Returns the value of thephotoURLrecord component.- Returns:
- the value of the
photoURLrecord component
-
videoURL
Returns the value of thevideoURLrecord component.- Returns:
- the value of the
videoURLrecord component
-
ingredients
Returns the value of theingredientsrecord component.- Returns:
- the value of the
ingredientsrecord component
-
instructions
Returns the value of theinstructionsrecord component.- Returns:
- the value of the
instructionsrecord component
-
creatorID
Returns the value of thecreatorIDrecord component.- Returns:
- the value of the
creatorIDrecord component
-