Record Class DrinkRequestDTO
java.lang.Object
java.lang.Record
br.com.receitaquedoimenos.ReceitaQueDoiMenos.models.drink.DrinkRequestDTO
- Record Components:
name- String correspondente ao nome do DrinktypeDrink- Enumerador correspondente ao tipo de DrinksphotoURL- String correspondente a URL da foto do DrinkvideoURL- String correspondente a URL do vÃdeo do Drinkingredients- Arraylist que corresponde aos ingredientes do Drinkinstructions- String correspondente ao modo de preparo de cada DrinkcreatorID- String correspondente ao ID do Criador
public record DrinkRequestDTO(@NotBlank String name, @NotNull TypeDrink typeDrink, 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 TypeDrinkReturns the value of thetypeDrinkrecord component.videoURL()Returns the value of thevideoURLrecord component.
-
Constructor Details
-
DrinkRequestDTO
public DrinkRequestDTO(@NotBlank @NotBlank String name, @NotNull @NotNull TypeDrink typeDrink, String photoURL, String videoURL, @NotNull @NotNull ArrayList<String> ingredients, @NotBlank @NotBlank String instructions, @NotBlank @NotBlank String creatorID) Creates an instance of aDrinkRequestDTOrecord class.- Parameters:
name- the value for thenamerecord componenttypeDrink- the value for thetypeDrinkrecord 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
-
typeDrink
Returns the value of thetypeDrinkrecord component.- Returns:
- the value of the
typeDrinkrecord 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
-