Package org.localify.dto
Class SpotifySearchQuery
java.lang.Object
org.localify.dto.SpotifySearchQuery
- All Implemented Interfaces:
Serializable
Represents a search query specifically for Spotify.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.Constructs a new SpotifySearchQuery with the specified query string.SpotifySearchQuery(String q, Integer limit) Constructs a new SpotifySearchQuery with the specified query string and limit. -
Method Summary
Modifier and TypeMethodDescriptionGets whether to automatically search Spotify.@NotNull IntegergetLimit()Gets the search limit.getQ()Gets the search query string.org.springframework.data.domain.Pageablepageable()Creates a Pageable object from the search query.voidsetAutoSearchSpotify(Boolean autoSearchSpotify) Sets whether to automatically search Spotify.voidSets the search limit.voidSets the search query string.toString()Returns a string representation of the object.
-
Field Details
-
DEFAULT_SEARCH_LIMIT
public static final int DEFAULT_SEARCH_LIMITThe default search limit.- See Also:
-
-
Constructor Details
-
SpotifySearchQuery
public SpotifySearchQuery()Default constructor. -
SpotifySearchQuery
Constructs a new SpotifySearchQuery with the specified query string.- Parameters:
q- The query string.
-
SpotifySearchQuery
Constructs a new SpotifySearchQuery with the specified query string and limit.- Parameters:
q- The query string.limit- The limit.
-
-
Method Details
-
getQ
Gets the search query string.- Returns:
- The search query string.
-
setQ
Sets the search query string.- Parameters:
q- The search query string.
-
getLimit
Gets the search limit.- Returns:
- The search limit.
-
setLimit
Sets the search limit.- Parameters:
limit- The search limit.
-
pageable
public org.springframework.data.domain.Pageable pageable()Creates a Pageable object from the search query.- Returns:
- A Pageable object.
-
getAutoSearchSpotify
Gets whether to automatically search Spotify.- Returns:
- true to automatically search Spotify, false otherwise.
-
setAutoSearchSpotify
Sets whether to automatically search Spotify.- Parameters:
autoSearchSpotify- true to automatically search Spotify, false otherwise.
-
toString
Returns a string representation of the object.
-