| 
 |   | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.vodafone360.people.database.tables.ConversationsTable
public abstract class ConversationsTable
| Nested Class Summary | |
|---|---|
| private static class | ConversationsTable.FieldAn enumeration of all the field names in the database, containing ID, LOCAL_CONTACT_ID, USER_ID, NETWORK_ID, NETWORK_STATUS. | 
| Field Summary | |
|---|---|
| private static java.lang.String | COLUMNS | 
| private static int | CONVERSATION_ID | 
| private static java.lang.String | DEFAULT_ERROR_MESSAGE | 
| private static int | LATEST_MESSAGE | 
| private static java.lang.String | TABLE_NAMEThe name of the table as it appears in the database. | 
| private static long | THIRTY_MINUTES | 
| private static int | USER_ID | 
| Constructor Summary | |
|---|---|
| ConversationsTable() | |
| Method Summary | |
|---|---|
| static void | addNewConversationId(ChatMessage msg,
                     SQLiteDatabase writableDb) | 
| private static boolean | conversationIdExists(java.lang.String conversationId,
                     SQLiteDatabase readableDb) | 
| static void | create(SQLiteDatabase writableDb)This method creates the PresenceTable. | 
| static void | fillMessageInByLocalContactIdAndNetworkId(ChatMessage msg,
                                          SQLiteDatabase readableDb,
                                          SQLiteDatabase writableDb)TODO: this method might need redesign for performance: don't SELECT !! | 
| static int | removeConversation(long localContactId,
                   int network,
                   SQLiteDatabase writableDb)This method removes the conversation with this contact on this network | 
| static int | removeConversation(java.lang.String conversationId,
                   SQLiteDatabase writableDb)This method removes the conversation with this id | 
| private static int | removeOldConversationByLocalContactIdAndNetworkId(long localContactId,
                                                  int networkId,
                                                  SQLiteDatabase writableDb) | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
private static final java.lang.String TABLE_NAME
private static final java.lang.String DEFAULT_ERROR_MESSAGE
private static final long THIRTY_MINUTES
private static final java.lang.String COLUMNS
private static final int CONVERSATION_ID
private static final int USER_ID
private static final int LATEST_MESSAGE
| Constructor Detail | 
|---|
public ConversationsTable()
| Method Detail | 
|---|
public static void create(SQLiteDatabase writableDb)
                   throws SQLException,
                          java.lang.NullPointerException
writableDb - - the writable database
SQLException - is thrown when request to create a table fails with
             an SQLException
java.lang.NullPointerException - if the passed in database instance is null
public static void addNewConversationId(ChatMessage msg,
                                        SQLiteDatabase writableDb)
                                 throws SQLException,
                                        java.lang.NullPointerException
SQLException
java.lang.NullPointerException
public static void fillMessageInByLocalContactIdAndNetworkId(ChatMessage msg,
                                                             SQLiteDatabase readableDb,
                                                             SQLiteDatabase writableDb)
                                                      throws SQLException,
                                                             java.lang.NullPointerException
timeLineId - readableDb - 
SQLException
java.lang.NullPointerException
private static int removeOldConversationByLocalContactIdAndNetworkId(long localContactId,
                                                                     int networkId,
                                                                     SQLiteDatabase writableDb)
                                                              throws SQLException,
                                                                     java.lang.NullPointerException
localContactId - networkId - writableDb - 
SQLException
java.lang.NullPointerException
private static boolean conversationIdExists(java.lang.String conversationId,
                                            SQLiteDatabase readableDb)
                                     throws SQLException,
                                            java.lang.NullPointerException
conversationId - readableDb - 
SQLException
java.lang.NullPointerException
public static int removeConversation(java.lang.String conversationId,
                                     SQLiteDatabase writableDb)
                              throws SQLException,
                                     java.lang.NullPointerException
conversationId - String - the conversation id to be removedwritableDb - DatabaseHelper - database
SQLException
java.lang.NullPointerException
public static int removeConversation(long localContactId,
                                     int network,
                                     SQLiteDatabase writableDb)
                              throws SQLException,
                                     java.lang.NullPointerException
localContactId - long - the contacts mLocalContactIdnetworkId - int - the network id, @see SocialNetworkwritableDb - DatabaseHelper - the database
SQLException
java.lang.NullPointerException| 
 |   | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
				
				JavaDoc