-
public final class QueryChannelsSpecSpec describing a query channels operation and the channel CIDs that belong to it.
Three identity flavors are supported:
Standard queries: identity is
(filter, querySort).Predefined queries: identity is predefinedFilterName plus the interpolation value maps. The filter and querySort held by this spec instance are the currently resolved values for that predefined query (captured by replacing the held spec instance — see
QueryChannelsMutableState.applyResolvedSpec).Grouped queries: identity is groupKey, the stable key returned by the server's grouped channels endpoint. filter and querySort hold the group's filter and sort from its latest request, or a neutral filter and
last_updateddescending when it had none.
cids is intentionally a body
varand not part of the primary constructor, so it does not participate in equals/hashCode/auto-generatedcopy()— it is treated as mutable spec payload rather than identity.The 2-arg constructor and 2-arg copy are kept for binary compatibility with callers that predate the variant-specific fields. They delegate to the primary constructor with the extras defaulted to their empty/null values.
-
-
Field Summary
Fields Modifier and Type Field Description private Set<String>cidsprivate final FilterObjectfilterprivate final QuerySorter<Channel>querySortprivate final StringgroupKeyprivate final StringpredefinedFilterNameprivate final Map<String, Object>predefinedFilterValuesprivate final Map<String, Object>predefinedSortValues
-
Constructor Summary
Constructors Constructor Description QueryChannelsSpec(FilterObject filter, QuerySorter<Channel> querySort)QueryChannelsSpec(FilterObject filter, QuerySorter<Channel> querySort, String groupKey, String predefinedFilterName, Map<String, Object> predefinedFilterValues, Map<String, Object> predefinedSortValues)
-
Method Summary
Modifier and Type Method Description final Set<String>getCids()CIDs of channels currently associated with this query. final UnitsetCids(Set<String> cids)CIDs of channels currently associated with this query. final FilterObjectgetFilter()final QuerySorter<Channel>getQuerySort()final StringgetGroupKey()final StringgetPredefinedFilterName()final Map<String, Object>getPredefinedFilterValues()final Map<String, Object>getPredefinedSortValues()final QueryChannelsSpeccopy(FilterObject filter, QuerySorter<Channel> querySort)Returns a new QueryChannelsSpec with filter and querySort replaced. -
-
Method Detail
-
getFilter
final FilterObject getFilter()
-
getQuerySort
final QuerySorter<Channel> getQuerySort()
-
getGroupKey
final String getGroupKey()
-
getPredefinedFilterName
final String getPredefinedFilterName()
-
getPredefinedFilterValues
final Map<String, Object> getPredefinedFilterValues()
-
getPredefinedSortValues
final Map<String, Object> getPredefinedSortValues()
-
copy
final QueryChannelsSpec copy(FilterObject filter, QuerySorter<Channel> querySort)
Returns a new QueryChannelsSpec with filter and querySort replaced. Variant-specific fields (groupKey, predefinedFilterName, predefinedFilterValues, predefinedSortValues) are carried over from the receiver; cids is not.
-
-
-
-