Record Class CreateUpdateStrategyDTO

java.lang.Object
java.lang.Record
com.bluebell.greenhouse.platform.models.api.dto.strategy.CreateUpdateStrategyDTO
Record Components:
referenceCode - strategy reference code
name - strategy name
description - optional strategy description
enabled - whether the strategy is enabled
implementations - optional strategy implementations. Required on strategy creation.

public record CreateUpdateStrategyDTO(@NotBlank @Size(max=75) String referenceCode, @NotBlank @Size(min=3,max=75) String name, @Size(max=500) String description, Boolean enabled, @Valid List<@NotNull CreateStrategyImplementationDTO> implementations) extends Record
Request object for creating and updating Strategy entities.
Version:
3.0.1
Author:
Stephen Prizio
  • Constructor Details

    • CreateUpdateStrategyDTO

      public CreateUpdateStrategyDTO(@NotBlank @Size(max=75) @NotBlank @Size(max=75) String referenceCode, @NotBlank @Size(min=3,max=75) @NotBlank @Size(min=3,max=75) String name, @Size(max=500) @Size(max=500) String description, Boolean enabled, @Valid @Valid List<@NotNull CreateStrategyImplementationDTO> implementations)
      Creates an instance of a CreateUpdateStrategyDTO record class.
      Parameters:
      referenceCode - the value for the referenceCode record component
      name - the value for the name record component
      description - the value for the description record component
      enabled - the value for the enabled record component
      implementations - the value for the implementations record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • referenceCode

      @NotBlank @Size(max=75) public @NotBlank @Size(max=75) String referenceCode()
      Returns the value of the referenceCode record component.
      Returns:
      the value of the referenceCode record component
    • name

      @NotBlank @Size(min=3, max=75) public @NotBlank @Size(min=3,max=75) String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • description

      @Size(max=500) public @Size(max=500) String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • enabled

      public Boolean enabled()
      Returns the value of the enabled record component.
      Returns:
      the value of the enabled record component
    • implementations

      @Valid public @Valid List<@NotNull CreateStrategyImplementationDTO> implementations()
      Returns the value of the implementations record component.
      Returns:
      the value of the implementations record component