Record Class EventPostAdminDTO

java.lang.Object
java.lang.Record
io.github.navjotsrakhra.eventmanager.dataModel.dto.EventPostAdminDTO
Record Components:
ID - The ID of the event post.
title - The title of the event.
content - The content of the event.
location - The location of the event.
startDay - The start day of the event.
endDay - The end day of the event.
startTime - The start time of the event.
endTime - The end time of the event.
postedBy - The user who posted the event.
postedAt - The date and time the event was posted.

public record EventPostAdminDTO(Long ID, String title, String content, String location, LocalDate startDay, LocalDate endDay, LocalTime startTime, LocalTime endTime, String postedBy, LocalDateTime postedAt) extends Record
The EventPostAdminDTO class represents an exposed version of an EventPost, providing a simplified interface for creating event posts. This DTO is used for admin purposes.
  • Constructor Details

    • EventPostAdminDTO

      public EventPostAdminDTO(Long ID, String title, String content, String location, LocalDate startDay, LocalDate endDay, LocalTime startTime, LocalTime endTime, String postedBy, LocalDateTime postedAt)
      Creates an instance of a EventPostAdminDTO record class.
      Parameters:
      ID - the value for the ID record component
      title - the value for the title record component
      content - the value for the content record component
      location - the value for the location record component
      startDay - the value for the startDay record component
      endDay - the value for the endDay record component
      startTime - the value for the startTime record component
      endTime - the value for the endTime record component
      postedBy - the value for the postedBy record component
      postedAt - the value for the postedAt 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.
    • ID

      public Long ID()
      Returns the value of the ID record component.
      Returns:
      the value of the ID record component
    • title

      public String title()
      Returns the value of the title record component.
      Returns:
      the value of the title record component
    • content

      public String content()
      Returns the value of the content record component.
      Returns:
      the value of the content record component
    • location

      public String location()
      Returns the value of the location record component.
      Returns:
      the value of the location record component
    • startDay

      public LocalDate startDay()
      Returns the value of the startDay record component.
      Returns:
      the value of the startDay record component
    • endDay

      public LocalDate endDay()
      Returns the value of the endDay record component.
      Returns:
      the value of the endDay record component
    • startTime

      public LocalTime startTime()
      Returns the value of the startTime record component.
      Returns:
      the value of the startTime record component
    • endTime

      public LocalTime endTime()
      Returns the value of the endTime record component.
      Returns:
      the value of the endTime record component
    • postedBy

      public String postedBy()
      Returns the value of the postedBy record component.
      Returns:
      the value of the postedBy record component
    • postedAt

      public LocalDateTime postedAt()
      Returns the value of the postedAt record component.
      Returns:
      the value of the postedAt record component