Record Class ClassTimeTableRequest

java.lang.Object
java.lang.Record
it.astromark.agenda.schoolclass.dto.ClassTimeTableRequest

public record ClassTimeTableRequest(@NotNull Integer schoolClassId, @NotNull LocalDate startDate, LocalDate endDate, @PositiveOrZero @Max(40L) Short expectedHours) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    ClassTimeTableRequest(@NotNull Integer schoolClassId, @NotNull LocalDate startDate, LocalDate endDate, @PositiveOrZero @Max(40L) Short expectedHours)
    Creates an instance of a ClassTimeTableRequest record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the endDate record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    @PositiveOrZero @Max(40L) Short
    Returns the value of the expectedHours record component.
    final int
    Returns a hash code value for this object.
    @NotNull Integer
    Returns the value of the schoolClassId record component.
    @NotNull LocalDate
    Returns the value of the startDate record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ClassTimeTableRequest

      public ClassTimeTableRequest(@NotNull @NotNull Integer schoolClassId, @NotNull @NotNull LocalDate startDate, LocalDate endDate, @PositiveOrZero @Max(40L) @PositiveOrZero @Max(40L) Short expectedHours)
      Creates an instance of a ClassTimeTableRequest record class.
      Parameters:
      schoolClassId - the value for the schoolClassId record component
      startDate - the value for the startDate record component
      endDate - the value for the endDate record component
      expectedHours - the value for the expectedHours 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.
    • schoolClassId

      @NotNull public @NotNull Integer schoolClassId()
      Returns the value of the schoolClassId record component.
      Returns:
      the value of the schoolClassId record component
    • startDate

      @NotNull public @NotNull LocalDate startDate()
      Returns the value of the startDate record component.
      Returns:
      the value of the startDate record component
    • endDate

      public LocalDate endDate()
      Returns the value of the endDate record component.
      Returns:
      the value of the endDate record component
    • expectedHours

      @PositiveOrZero @Max(40L) public @PositiveOrZero @Max(40L) Short expectedHours()
      Returns the value of the expectedHours record component.
      Returns:
      the value of the expectedHours record component