|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.vodafone360.people.engine.presence.ChatDbUtils
public class ChatDbUtils
| Field Summary | |
|---|---|
protected static java.lang.String |
COLUMNS
|
| Constructor Summary | |
|---|---|
ChatDbUtils()
|
|
| Method Summary | |
|---|---|
protected static void |
cleanOldConversationsExceptForContact(long localContactId,
DatabaseHelper dbHelper)
This method deletes conversations older than 1 week except for those with current contact |
protected static void |
convertUserIds(ChatMessage msg,
DatabaseHelper databaseHelper)
|
protected static void |
deleteConversationById(java.lang.String conversationId,
DatabaseHelper dbHelper)
This method deletes the conversation with the given id from the ConversationsTable |
private static void |
fillInContactDetails(ChatMessage msg,
ActivitiesTable.TimelineSummaryItem item,
DatabaseHelper databaseHelper,
ActivitiesTable.TimelineSummaryItem.Type incoming)
Remove hard code |
protected static void |
fillMessageByLocalContactIdAndNetworkId(ChatMessage chatMessage,
DatabaseHelper databaseHelper)
This method copies the conversation id and user id into the supplied ChatMessage based on its mNetworkId and mLocalContactId |
protected static void |
findUserIdForMessageByLocalContactIdAndNetworkId(ChatMessage msg,
DatabaseHelper databaseHelper)
This method finds the user id (360 UserId or 3rd-party network id) and sets it into the supplied chat message |
static int |
getNumberOfUnreadChatMessagesForContactAndNetwork(long localContactId,
java.lang.String network,
DatabaseHelper dbHelper)
This method returns the number of unread chat messages for this contact |
protected static void |
saveChatMessageAsATimeline(ChatMessage message,
ActivitiesTable.TimelineSummaryItem.Type type,
DatabaseHelper databaseHelper)
This method saves the supplied |
protected static void |
updateUnsentChatMessage(DatabaseHelper dbHelper)
This method updates the last outgoing chat message as unsent in ActivitiesTable, and removes the conversation id of this message from the ConversationsTable. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String COLUMNS
| Constructor Detail |
|---|
public ChatDbUtils()
| Method Detail |
|---|
protected static void convertUserIds(ChatMessage msg,
DatabaseHelper databaseHelper)
protected static void saveChatMessageAsATimeline(ChatMessage message,
ActivitiesTable.TimelineSummaryItem.Type type,
DatabaseHelper databaseHelper)
msg - type - databaseHelper -
private static void fillInContactDetails(ChatMessage msg,
ActivitiesTable.TimelineSummaryItem item,
DatabaseHelper databaseHelper,
ActivitiesTable.TimelineSummaryItem.Type incoming)
msg - item - databaseHelper - incoming -
protected static void fillMessageByLocalContactIdAndNetworkId(ChatMessage chatMessage,
DatabaseHelper databaseHelper)
chatMessage - ChatMessagedatabaseHelper - Databasehelper
protected static void findUserIdForMessageByLocalContactIdAndNetworkId(ChatMessage msg,
DatabaseHelper databaseHelper)
msg - ChatMessage - the supplied chat messagedatabaseHelper - DatabaseHelper - the database
protected static void deleteConversationById(java.lang.String conversationId,
DatabaseHelper dbHelper)
conversationId - String - the conversation iddbHelper - DatabaseHelper - the database
protected static void cleanOldConversationsExceptForContact(long localContactId,
DatabaseHelper dbHelper)
localContactId - long- current contact mLocalContactIddbHelper - DatabaseHelper - the database
public static int getNumberOfUnreadChatMessagesForContactAndNetwork(long localContactId,
java.lang.String network,
DatabaseHelper dbHelper)
localContactId - long - the contact's mLocalContactIdnetwork - String - the specified network, @see SocialNetworkdbHelper - Database - the database
protected static void updateUnsentChatMessage(DatabaseHelper dbHelper)
dbHelper - DatabaseHelper - database
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
JavaDoc