English | Site Directory

Android - An Open Handset Alliance Project

android.content
public abstract class

android.content.AbstractTableMerger

java.lang.Object
android.content.AbstractTableMerger

Summary

Fields

protected      SQLiteDatabase  mDB   
protected      String  mDeletedTable   
protected      Uri  mDeletedTableURL   
protected  static    ContentValues  mSyncMarkValues   
protected      String  mTable   
protected      Uri  mTableURL   

Public Constructors

          AbstractTableMerger(DatabaseContentProvider provider, String table, Uri tableURL, String deletedTable, Uri deletedTableURL)

Public Methods

        void  merge(SyncContext context, String account, ContentProvider serverDiffs, boolean readOnly, MergeResult results, ContentProvider temporaryInstanceFactory)
Carry out a merge of the given diffs, and add the results to the given MergeResult.
        void  onMergeCancelled()

Protected Methods

        void  cursorRowToContentValues(Cursor cursor, ContentValues map)
Converts cursor into a Map, using the correct types for the values.
        void  deleteRow(long localPersonID, Cursor localCursor)
abstract        void  insertRow(ContentProvider diffs, Cursor diffsCursor)
abstract        void  notifyChanges()
After merge(SyncContext, String, ContentProvider, boolean, MergeResult, ContentProvider) has completed, this method is called to send notifications to ContentObservers of changes to the containing ContentProvider.
abstract        void  resolveRow(long localPersonID, String syncID, ContentProvider diffs, Cursor diffsCursor)
abstract        void  updateRow(long localPersonID, ContentProvider diffs, Cursor diffsCursor)
Methods inherited from class java.lang.Object

Details

Fields

protected SQLiteDatabase mDB

protected String mDeletedTable

protected Uri mDeletedTableURL

protected static ContentValues mSyncMarkValues

protected String mTable

protected Uri mTableURL

Public Constructors

public AbstractTableMerger(DatabaseContentProvider provider, String table, Uri tableURL, String deletedTable, Uri deletedTableURL)

Public Methods

public void merge(SyncContext context, String account, ContentProvider serverDiffs, boolean readOnly, MergeResult results, ContentProvider temporaryInstanceFactory)

Carry out a merge of the given diffs, and add the results to the given MergeResult. If we are the first merge to find client-side diffs, we'll use the given ContentProvider to construct a temporary instance to hold them.

public void onMergeCancelled()

Protected Methods

protected void cursorRowToContentValues(Cursor cursor, ContentValues map)

Converts cursor into a Map, using the correct types for the values.

protected void deleteRow(long localPersonID, Cursor localCursor)

protected abstract void insertRow(ContentProvider diffs, Cursor diffsCursor)

protected abstract void notifyChanges()

After merge(SyncContext, String, ContentProvider, boolean, MergeResult, ContentProvider) has completed, this method is called to send notifications to ContentObservers of changes to the containing ContentProvider. These notifications likely do not want to request a sync back to the network.

protected abstract void resolveRow(long localPersonID, String syncID, ContentProvider diffs, Cursor diffsCursor)

protected abstract void updateRow(long localPersonID, ContentProvider diffs, Cursor diffsCursor)

Build m5-rc15g - 14 May 2008 12:50