Class Festival

java.lang.Object
org.localify.festival.jpa.Festival

@Entity public class Festival extends Object
Represents a festival entity. This class mimics the behavior of a City in some respects.
  • Constructor Details

    • Festival

      protected Festival()
      Protected no-arg constructor for JPA.
    • Festival

      public Festival(String name, LocalDate startDate, LocalDate endDate)
      Constructs a new Festival.
      Parameters:
      name - The name of the festival.
      startDate - The start date of the festival.
      endDate - The end date of the festival.
  • Method Details

    • getNickname

      public String getNickname()
      Gets the nickname of the festival.
      Returns:
      The nickname.
    • setNickname

      public void setNickname(String nickname)
      Sets the nickname of the festival.
      Parameters:
      nickname - The nickname.
    • getDescription

      public String getDescription()
      Gets the description of the festival.
      Returns:
      The description.
    • setDescription

      public void setDescription(String description)
      Sets the description of the festival.
      Parameters:
      description - The description.
    • getAddress

      public String getAddress()
      Gets the address of the festival.
      Returns:
      The address.
    • setAddress

      public void setAddress(String address)
      Sets the address of the festival.
      Parameters:
      address - The address.
    • getUpdatedAt

      public Instant getUpdatedAt()
      Gets the last update timestamp.
      Returns:
      The last update timestamp.
    • setUpdatedAt

      public void setUpdatedAt(Instant updatedAt)
      Sets the last update timestamp.
      Parameters:
      updatedAt - The last update timestamp.
    • getStartDate

      public LocalDate getStartDate()
      Gets the start date of the festival.
      Returns:
      The start date.
    • setStartDate

      public void setStartDate(LocalDate startDate)
      Sets the start date of the festival.
      Parameters:
      startDate - The start date.
    • getEndDate

      public LocalDate getEndDate()
      Gets the end date of the festival.
      Returns:
      The end date.
    • setEndDate

      public void setEndDate(LocalDate endDate)
      Sets the end date of the festival.
      Parameters:
      endDate - The end date.
    • getGeoPoint

      public org.locationtech.jts.geom.Point getGeoPoint()
      Gets the geographic point of the festival.
      Returns:
      The geographic point.
    • setGeoPoint

      public void setGeoPoint(org.locationtech.jts.geom.Point geoPoint)
      Sets the geographic point of the festival.
      Parameters:
      geoPoint - The geographic point.
    • getCity

      public City getCity()
      Gets the city of the festival.
      Returns:
      The city.
    • setCity

      public void setCity(City city)
      Sets the city of the festival.
      Parameters:
      city - The city.
    • getName

      public String getName()
      Gets the name of the festival.
      Returns:
      The name.
    • setName

      public void setName(String name)
      Sets the name of the festival.
      Parameters:
      name - The name.
    • getId

      public UUID getId()
      Gets the ID of the festival.
      Returns:
      The ID.
    • getCreatedAt

      public Instant getCreatedAt()
      Gets the creation timestamp.
      Returns:
      The creation timestamp.
    • setId

      public void setId(UUID id)
      Sets the ID of the festival.
      Parameters:
      id - The ID.
    • setCreatedAt

      public void setCreatedAt(Instant createdAt)
      Sets the creation timestamp.
      Parameters:
      createdAt - The creation timestamp.
    • getUrl

      public String getUrl()
      Gets the URL of the festival.
      Returns:
      The URL.
    • setUrl

      public void setUrl(String url)
      Sets the URL of the festival.
      Parameters:
      url - The URL.
    • getScheduleUrl

      public String getScheduleUrl()
      Gets the schedule URL of the festival.
      Returns:
      The schedule URL.
    • setScheduleUrl

      public void setScheduleUrl(String scheduleUrl)
      Sets the schedule URL of the festival.
      Parameters:
      scheduleUrl - The schedule URL.
    • getImageUrl

      public String getImageUrl()
      Gets the image URL of the festival.
      Returns:
      The image URL.
    • setImageUrl

      public void setImageUrl(String imageUrl)
      Sets the image URL of the festival.
      Parameters:
      imageUrl - The image URL.
    • getTimeZone

      public ZoneId getTimeZone()
      Gets the time zone of the festival.
      Returns:
      The time zone.
    • setTimeZone

      public void setTimeZone(ZoneId timeZone)
      Sets the time zone of the festival.
      Parameters:
      timeZone - The time zone.
    • toResponse

      public FestivalResponse toResponse()
      Converts the festival to a response DTO.
      Returns:
      The festival response DTO.
    • toResponse

      public FestivalResponse toResponse(Boolean isUserPlace)
      Converts the festival to a response DTO.
      Parameters:
      isUserPlace - Whether the festival is one of the user's places.
      Returns:
      The festival response DTO.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object