public abstract class ChatStore
extends java.lang.Object
| Constructor and Description |
|---|
ChatStore() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
beginTransaction()
Begin transaction.
|
abstract boolean |
clearDatabase()
Delete all content of persistence store that is related to current user.
|
abstract boolean |
deleteAllMessages(java.lang.String conversationId)
Delete all messages from persistence store that are related to given conversation.
|
abstract boolean |
deleteConversation(java.lang.String conversationId)
Delete conversation from persistence store.
|
abstract boolean |
deleteMessage(java.lang.String conversationId,
java.lang.String messageId)
Delete message from persistence store.
|
abstract void |
endTransaction()
End transaction.
|
abstract java.util.List<ChatConversationBase> |
getAllConversations()
Get all conversations from persistence store.
|
abstract ChatConversationBase |
getConversation(java.lang.String conversationId)
Get conversation from persistence store.
|
abstract boolean |
update(ChatConversationBase conversation)
Update conversation in persistence store.
|
abstract boolean |
update(ChatMessageStatus status)
Update stored
ChatMessage with a new ChatMessageStatus. |
abstract boolean |
upsert(ChatConversation conversation)
Insert or update conversation in persistence store.
|
abstract boolean |
upsert(ChatMessage message)
Insert or update message in persistence store.
|
public abstract ChatConversationBase getConversation(java.lang.String conversationId)
conversationId - Unique global conversation identifier.public abstract java.util.List<ChatConversationBase> getAllConversations()
public abstract boolean upsert(ChatConversation conversation)
conversation - Conversation to insert or update.public abstract boolean update(ChatConversationBase conversation)
conversation - Conversation to update.public abstract boolean deleteConversation(java.lang.String conversationId)
conversationId - Unique global conversation identifier of an conversation to delete.public abstract boolean upsert(ChatMessage message)
message - Message to insert or update.public abstract boolean update(ChatMessageStatus status)
ChatMessage with a new ChatMessageStatus. The chat message is unique for a combination of messageId, profileId and LocalMessageStatus value.status - Chat message status for the ChatMessage with id ChatMessageStatus.getMessageId()public abstract boolean deleteAllMessages(java.lang.String conversationId)
conversationId - Unique global conversation identifier.public abstract boolean deleteMessage(java.lang.String conversationId,
java.lang.String messageId)
conversationId - Unique global conversation identifier.messageId - Unique global message identifier.public abstract boolean clearDatabase()
public abstract void beginTransaction()
endTransaction() on same instance is called.public abstract void endTransaction()