-
- All Implemented Interfaces:
-
io.getstream.chat.android.client.persistance.repository.AttachmentRepository,io.getstream.chat.android.client.persistance.repository.ChannelConfigRepository,io.getstream.chat.android.client.persistance.repository.ChannelRepository,io.getstream.chat.android.client.persistance.repository.MessageRepository,io.getstream.chat.android.client.persistance.repository.QueryChannelsRepository,io.getstream.chat.android.client.persistance.repository.ReactionRepository,io.getstream.chat.android.client.persistance.repository.SyncStateRepository,io.getstream.chat.android.client.persistance.repository.UserRepository
public final class RepositoryFacade implements UserRepository, ChannelRepository, ReactionRepository, MessageRepository, ChannelConfigRepository, QueryChannelsRepository, SyncStateRepository, AttachmentRepository
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classRepositoryFacade.Companion
-
Method Summary
Modifier and Type Method Description List<Channel>selectChannels(List<String> channelCIDs, Boolean forceCache)Select channels by full channel IDs Channel.cid final List<Channel>selectChannels(List<String> channelIds, AnyChannelPaginationRequest pagination, Boolean forceCache)final UnitenrichChannel(Channel $self, Map<String, List<Message>> messageMap, Config defaultConfig)UnitinsertChannel(Channel channel)Inserts a Channel UnitinsertChannels(Collection<Channel> channels)Inserts many Channels. UnitinsertMessage(Message message, Boolean cache)Inserts a messages. UnitinsertMessages(List<Message> messages, Boolean cache)Inserts many messages. UnitdeleteChannelMessagesBefore(String cid, Date hideMessagesBefore)Deletes channel messages before hideMessagesBefore and removes channel from the cache. UnitinsertReaction(Reaction reaction)Inserts a reaction. UnitupdateMembersForChannel(String cid, List<Member> members)Updates the members of a Channel final UnitstoreStateForChannels(Collection<ChannelConfig> configs, List<User> users, Collection<Channel> channels, List<Message> messages, Boolean cacheForMessages)Unitclear()Clear users of this repository. -
Methods inherited from class io.getstream.chat.android.client.persistance.repository.UserRepository
insertCurrentUser, insertUser, insertUsers, observeLatestUsers, selectAllUsers, selectUser, selectUsers, selectUsersLikeName -
Methods inherited from class io.getstream.chat.android.client.persistance.repository.ChannelRepository
clearChannelCache, deleteChannel, evictChannel, selectAllCids, selectChannelByCid, selectChannelCidsBySyncNeeded, selectChannelWithoutMessages, selectChannelsByCids, selectChannelsSyncNeeded, selectMembersForChannel, setChannelDeletedAt, setHiddenForChannel, setHiddenForChannel, updateLastMessageForChannel -
Methods inherited from class io.getstream.chat.android.client.persistance.repository.ReactionRepository
selectReactionById, selectReactionIdsBySyncStatus, selectReactionsByIds, selectReactionsBySyncStatus, selectUserReactionToMessage, selectUserReactionsToMessage, updateReactionsForMessageByDeletedDate -
Methods inherited from class io.getstream.chat.android.client.persistance.repository.MessageRepository
deleteChannelMessage, selectMessage, selectMessageBySyncState, selectMessageIdsBySyncState, selectMessages, selectMessagesForChannel, selectMessagesForThread -
Methods inherited from class io.getstream.chat.android.client.persistance.repository.ChannelConfigRepository
cacheChannelConfigs, insertChannelConfig, insertChannelConfigs, selectChannelConfig -
Methods inherited from class io.getstream.chat.android.client.persistance.repository.QueryChannelsRepository
insertQueryChannels, selectBy -
Methods inherited from class io.getstream.chat.android.client.persistance.repository.SyncStateRepository
insertSyncState, selectSyncState -
Methods inherited from class io.getstream.chat.android.client.persistance.repository.AttachmentRepository
observeAttachmentsForMessage -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
selectChannels
List<Channel> selectChannels(List<String> channelCIDs, Boolean forceCache)
Select channels by full channel IDs Channel.cid
- Parameters:
channelCIDs- A list of Channel.cid as query specification.forceCache- A boolean flag that forces cache in repository and fetches data directly in database if passed value is true.
-
selectChannels
final List<Channel> selectChannels(List<String> channelIds, AnyChannelPaginationRequest pagination, Boolean forceCache)
-
enrichChannel
final Unit enrichChannel(Channel $self, Map<String, List<Message>> messageMap, Config defaultConfig)
-
insertChannel
Unit insertChannel(Channel channel)
Inserts a Channel
- Parameters:
channel- Channel
-
insertChannels
Unit insertChannels(Collection<Channel> channels)
Inserts many Channels.
- Parameters:
channels- collection of Channel
-
insertMessage
Unit insertMessage(Message message, Boolean cache)
Inserts a messages.
- Parameters:
message- Messagecache- Boolean.
-
insertMessages
Unit insertMessages(List<Message> messages, Boolean cache)
Inserts many messages.
- Parameters:
messages- list of Messagecache- Boolean.
-
deleteChannelMessagesBefore
Unit deleteChannelMessagesBefore(String cid, Date hideMessagesBefore)
Deletes channel messages before hideMessagesBefore and removes channel from the cache.
- Parameters:
cid- of message - String.hideMessagesBefore- Boolean.
-
insertReaction
Unit insertReaction(Reaction reaction)
Inserts a reaction.
- Parameters:
reaction- Reaction
-
updateMembersForChannel
Unit updateMembersForChannel(String cid, List<Member> members)
Updates the members of a Channel
- Parameters:
cid- String.members- list of Member
-
storeStateForChannels
final Unit storeStateForChannels(Collection<ChannelConfig> configs, List<User> users, Collection<Channel> channels, List<Message> messages, Boolean cacheForMessages)
-
-
-
-