java.lang.Object
io.github.navjotsrakhra.eventmanager.dataModel.EventPost

@Entity public class EventPost extends Object
The EventPost class represents an event post entity with details such as title, content, location, and date/time information.
  • Constructor Details

    • EventPost

      public EventPost()
      Default constructor initializes the 'postedAt' timestamp to the current date and time.
    • EventPost

      public EventPost(String title, String content, String location, LocalDate startDay, LocalDate endDay, LocalTime startTime, LocalTime endTime) throws DateValidationFailedException
      Constructor for creating an EventPost with provided details.
      Parameters:
      title - The title of the event.
      content - The content or description of the event.
      location - The location where the event will take place.
      startDay - The starting date of the event.
      endDay - The ending date of the event.
      startTime - The starting time of the event.
      endTime - The ending time of the event.
      Throws:
      DateValidationFailedException - If date validation fails.
  • Method Details

    • setTitle

      public void setTitle(String title)
      Set the title of the event.
      Parameters:
      title - The title to be set.
    • setContent

      public void setContent(String content)
      Set the content or description of the event.
      Parameters:
      content - The content to be set.
    • setLocation

      public void setLocation(String location)
      Set the location where the event will take place.
      Parameters:
      location - The location to be set.
    • setStartDay

      public void setStartDay(LocalDate startDay) throws DateValidationFailedException
      Set the starting date of the event, performing date validation.
      Parameters:
      startDay - The starting date to be set.
      Throws:
      DateValidationFailedException - If date validation fails.
    • setEndDay

      public void setEndDay(LocalDate endDay) throws DateValidationFailedException
      Set the ending date of the event, performing date validation.
      Parameters:
      endDay - The ending date to be set.
      Throws:
      DateValidationFailedException - If date validation fails.
    • setStartTime

      public void setStartTime(LocalTime startTime) throws DateValidationFailedException
      Set the starting time of the event, performing time validation.
      Parameters:
      startTime - The starting time to be set.
      Throws:
      DateValidationFailedException - If time validation fails.
    • setEndTime

      public void setEndTime(LocalTime endTime) throws DateValidationFailedException
      Set the ending time of the event, performing time validation.
      Parameters:
      endTime - The ending time to be set.
      Throws:
      DateValidationFailedException - If time validation fails.
    • setId

      public void setId(Long id)
    • setPostedBy

      public void setPostedBy(String postedBy)