Package org.localify.user.support
Class UserCity
java.lang.Object
org.localify.user.support.UserCity
- All Implemented Interfaces:
Comparable<UserCity>
Represents the association between a user and a city.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents the composite key for the user city. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetCity()Gets the city for the user city.Gets the creation timestamp of the user city.Gets the distance for the user city.Gets the end date for the user city.getKey()Gets the key for the user city.Gets the playlist for the user city.Gets the selected at time for the user city.Gets the sort setting for event recommendations.Gets the start date for the user city.Gets the time frame for the user city.Gets the last update timestamp of the user city.getUser()Gets the user for the user city.voidselect()Sets the selected at time to now.voidsetDistance(Double distance) Sets the distance for the user city.voidsetEndDate(Instant endDate) Sets the end date for the user city.voidsetPlaylist(Playlist playlist) Sets the playlist for the user city.voidsetSelectedAt(Instant selectedAt) Sets the selected at time for the user city.voidsetSortEventRecsBy(RecSortSetting sortEventRecsBy) Sets the sort setting for event recommendations.voidsetStartDate(Instant startDate) Sets the start date for the user city.voidsetTimeFrame(CitySelectionTimeFrame timeFrame) Sets the time frame for the user city.Converts the user city to a response container.
-
Constructor Details
-
UserCity
Creates a new user city.- Parameters:
user- The user.city- The city.distance- The distance.
-
UserCity
protected UserCity()Default constructor.
-
-
Method Details
-
setPlaylist
Sets the playlist for the user city.- Parameters:
playlist- The playlist.
-
select
public void select()Sets the selected at time to now. -
toResponseContainer
Converts the user city to a response container.- Returns:
- The response container.
-
getTimeFrame
Gets the time frame for the user city.- Returns:
- The time frame.
-
setTimeFrame
Sets the time frame for the user city.- Parameters:
timeFrame- The time frame.
-
getKey
Gets the key for the user city.- Returns:
- The key.
-
getUser
Gets the user for the user city.- Returns:
- The user.
-
getCity
Gets the city for the user city.- Returns:
- The city.
-
getCreatedAt
Gets the creation timestamp of the user city.- Returns:
- The creation timestamp.
-
getUpdatedAt
Gets the last update timestamp of the user city.- Returns:
- The last update timestamp.
-
getStartDate
Gets the start date for the user city.- Returns:
- The start date.
-
getEndDate
Gets the end date for the user city.- Returns:
- The end date.
-
getDistance
Gets the distance for the user city.- Returns:
- The distance.
-
setDistance
Sets the distance for the user city.- Parameters:
distance- The distance.
-
getSelectedAt
Gets the selected at time for the user city.- Returns:
- The selected at time.
-
setSelectedAt
Sets the selected at time for the user city.- Parameters:
selectedAt- The selected at time.
-
setStartDate
Sets the start date for the user city.- Parameters:
startDate- The start date.
-
setEndDate
Sets the end date for the user city.- Parameters:
endDate- The end date.
-
getSortEventRecsBy
Gets the sort setting for event recommendations.- Returns:
- The sort setting.
-
setSortEventRecsBy
Sets the sort setting for event recommendations.- Parameters:
sortEventRecsBy- The sort setting.
-
compareTo
- Specified by:
compareToin interfaceComparable<UserCity>
-
getPlaylist
Gets the playlist for the user city.- Returns:
- The playlist.
-