Package org.localify.festival.jpa
Class Festival
java.lang.Object
org.localify.festival.jpa.Festival
Represents a festival entity.
This class mimics the behavior of a City in some respects.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets the address of the festival.getCity()Gets the city of the festival.Gets the creation timestamp.Gets the description of the festival.Gets the end date of the festival.org.locationtech.jts.geom.PointGets the geographic point of the festival.getId()Gets the ID of the festival.Gets the image URL of the festival.getName()Gets the name of the festival.Gets the nickname of the festival.Gets the schedule URL of the festival.Gets the start date of the festival.Gets the time zone of the festival.Gets the last update timestamp.getUrl()Gets the URL of the festival.inthashCode()voidsetAddress(String address) Sets the address of the festival.voidSets the city of the festival.voidsetCreatedAt(Instant createdAt) Sets the creation timestamp.voidsetDescription(String description) Sets the description of the festival.voidsetEndDate(LocalDate endDate) Sets the end date of the festival.voidsetGeoPoint(org.locationtech.jts.geom.Point geoPoint) Sets the geographic point of the festival.voidSets the ID of the festival.voidsetImageUrl(String imageUrl) Sets the image URL of the festival.voidSets the name of the festival.voidsetNickname(String nickname) Sets the nickname of the festival.voidsetScheduleUrl(String scheduleUrl) Sets the schedule URL of the festival.voidsetStartDate(LocalDate startDate) Sets the start date of the festival.voidsetTimeZone(ZoneId timeZone) Sets the time zone of the festival.voidsetUpdatedAt(Instant updatedAt) Sets the last update timestamp.voidSets the URL of the festival.Converts the festival to a response DTO.toResponse(Boolean isUserPlace) Converts the festival to a response DTO.
-
Constructor Details
-
Festival
protected Festival()Protected no-arg constructor for JPA. -
Festival
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
Gets the nickname of the festival.- Returns:
- The nickname.
-
setNickname
Sets the nickname of the festival.- Parameters:
nickname- The nickname.
-
getDescription
Gets the description of the festival.- Returns:
- The description.
-
setDescription
Sets the description of the festival.- Parameters:
description- The description.
-
getAddress
Gets the address of the festival.- Returns:
- The address.
-
setAddress
Sets the address of the festival.- Parameters:
address- The address.
-
getUpdatedAt
Gets the last update timestamp.- Returns:
- The last update timestamp.
-
setUpdatedAt
Sets the last update timestamp.- Parameters:
updatedAt- The last update timestamp.
-
getStartDate
Gets the start date of the festival.- Returns:
- The start date.
-
setStartDate
Sets the start date of the festival.- Parameters:
startDate- The start date.
-
getEndDate
Gets the end date of the festival.- Returns:
- The end date.
-
setEndDate
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
Gets the city of the festival.- Returns:
- The city.
-
setCity
Sets the city of the festival.- Parameters:
city- The city.
-
getName
Gets the name of the festival.- Returns:
- The name.
-
setName
Sets the name of the festival.- Parameters:
name- The name.
-
getId
Gets the ID of the festival.- Returns:
- The ID.
-
getCreatedAt
Gets the creation timestamp.- Returns:
- The creation timestamp.
-
setId
Sets the ID of the festival.- Parameters:
id- The ID.
-
setCreatedAt
Sets the creation timestamp.- Parameters:
createdAt- The creation timestamp.
-
getUrl
Gets the URL of the festival.- Returns:
- The URL.
-
setUrl
Sets the URL of the festival.- Parameters:
url- The URL.
-
getScheduleUrl
Gets the schedule URL of the festival.- Returns:
- The schedule URL.
-
setScheduleUrl
Sets the schedule URL of the festival.- Parameters:
scheduleUrl- The schedule URL.
-
getImageUrl
Gets the image URL of the festival.- Returns:
- The image URL.
-
setImageUrl
Sets the image URL of the festival.- Parameters:
imageUrl- The image URL.
-
getTimeZone
Gets the time zone of the festival.- Returns:
- The time zone.
-
setTimeZone
Sets the time zone of the festival.- Parameters:
timeZone- The time zone.
-
toResponse
Converts the festival to a response DTO.- Returns:
- The festival response DTO.
-
toResponse
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
-
hashCode
public int hashCode()
-