Class ChannelsQueryParams
-
- All Implemented Interfaces:
public final class ChannelsQueryParamsChannel list pagination query parameters.
Used with ai.nexconn.chat.channel.BaseChannel.createChannelsQuery to create a pagination query object. All parameters are immutable after creation to ensure consistency during the query process.
Usage Example:
val params = ChannelsQueryParams( channelTypes = listOf(ChannelType.DIRECT, ChannelType.GROUP) ).apply { pageSize = 20 topPriority = true } val query = BaseChannel.createChannelListQuery(params) query.loadNextPage { list, error -> // ... }
-
-
Field Summary
Fields Modifier and Type Field Description private IntegerpageSizeprivate BooleantopPriorityprivate LongstartTimeprivate final List<ChannelType>channelTypes
-
Constructor Summary
Constructors Constructor Description ChannelsQueryParams(List<ChannelType> channelTypes)
-
Method Summary
Modifier and Type Method Description final IntegergetPageSize()Number of items per page. final UnitsetPageSize(Integer pageSize)Number of items per page. final BooleangetTopPriority()Whether pinned channels are returned first. final UnitsetTopPriority(Boolean topPriority)Whether pinned channels are returned first. final LonggetStartTime()Start timestamp (milliseconds) for the query. final UnitsetStartTime(Long startTime)Start timestamp (milliseconds) for the query. final List<ChannelType>getChannelTypes()StringtoString()-
-
Constructor Detail
-
ChannelsQueryParams
ChannelsQueryParams(List<ChannelType> channelTypes)
- Parameters:
channelTypes- List of channel types to query.
-
-
Method Detail
-
getPageSize
final Integer getPageSize()
Number of items per page. Defaults to 20.
-
setPageSize
final Unit setPageSize(Integer pageSize)
Number of items per page. Defaults to 20.
-
getTopPriority
final Boolean getTopPriority()
Whether pinned channels are returned first.
When true, pinned channels are prioritized in the results. When false, results are sorted by time only. Defaults to true.
-
setTopPriority
final Unit setTopPriority(Boolean topPriority)
Whether pinned channels are returned first.
When true, pinned channels are prioritized in the results. When false, results are sorted by time only. Defaults to true.
-
getStartTime
final Long getStartTime()
Start timestamp (milliseconds) for the query.
Channels will be fetched starting from this timestamp. Defaults to 0, which starts from the latest channel.
-
setStartTime
final Unit setStartTime(Long startTime)
Start timestamp (milliseconds) for the query.
Channels will be fetched starting from this timestamp. Defaults to 0, which starts from the latest channel.
-
getChannelTypes
final List<ChannelType> getChannelTypes()
-
toString
String toString()
-
-
-
-