Search in sources :

Example 16 with TimelineSummaryItem

use of com.vodafone360.people.database.tables.ActivitiesTable.TimelineSummaryItem in project 360-Engine-for-Android by 360.

the class DatabaseHelper method addTimelineEvents.

/***
     * Add timeline events to the database.
     * 
     * @param syncItemList The list of items to be added
     * @param isCallLog true if the list has come from the call-log, false
     *            otherwise
     * @return SUCCESS or a suitable error code
     * @see #deleteActivities(Integer)
     * @see #fetchActivitiesIds(List, Long)
     */
public ServiceStatus addTimelineEvents(ArrayList<TimelineSummaryItem> syncItemList, boolean isCallLog) {
    if (Settings.ENABLED_DATABASE_TRACE)
        trace(false, "DatabaseHelper.addTimelineEvents() isCallLog[" + isCallLog + "]");
    SQLiteDatabase writableDb = getWritableDatabase();
    ServiceStatus status = ActivitiesTable.addTimelineEvents(syncItemList, isCallLog, writableDb);
    if (ServiceStatus.SUCCESS == status) {
        fireDatabaseChangedEvent(DatabaseChangeType.ACTIVITIES, true);
    }
    return status;
}
Also used : SQLiteDatabase(android.database.sqlite.SQLiteDatabase) ServiceStatus(com.vodafone360.people.service.ServiceStatus)

Aggregations

TimelineSummaryItem (com.vodafone360.people.database.tables.ActivitiesTable.TimelineSummaryItem)12 SQLiteDatabase (android.database.sqlite.SQLiteDatabase)7 ServiceStatus (com.vodafone360.people.service.ServiceStatus)7 Cursor (android.database.Cursor)5 ArrayList (java.util.ArrayList)5 Date (java.util.Date)5 ContactDetail (com.vodafone360.people.datatypes.ContactDetail)4 VCardHelper (com.vodafone360.people.datatypes.VCardHelper)4 Suppress (android.test.suitebuilder.annotation.Suppress)3 ActivityItem (com.vodafone360.people.datatypes.ActivityItem)3 Contact (com.vodafone360.people.datatypes.Contact)3 TimelineNativeTypes (com.vodafone360.people.database.tables.ActivitiesTable.TimelineNativeTypes)2 Uri (android.net.Uri)1 Bundle (android.os.Bundle)1 ContactSummary (com.vodafone360.people.datatypes.ContactSummary)1 IPeopleService (com.vodafone360.people.service.interfaces.IPeopleService)1