public abstract class

SQLiteContentProvider

extends ContentProvider
implements SQLiteTransactionListener
java.lang.Object
   ↳ android.content.ContentProvider
     ↳ com.android.providers.contacts.SQLiteContentProvider
Known Direct Subclasses

Class Overview

General purpose ContentProvider base class that uses SQLiteDatabase for storage.

Summary

[Expand]
Inherited Constants
From interface android.content.ComponentCallbacks2
Fields
protected SQLiteDatabase mDb
Public Constructors
SQLiteContentProvider()
Public Methods
ContentProviderResult[] applyBatch(ArrayList<ContentProviderOperation> operations)
int bulkInsert(Uri uri, ContentValues[] values)
int delete(Uri uri, String selection, String[] selectionArgs)
Uri insert(Uri uri, ContentValues values)
void onBegin()
void onCommit()
boolean onCreate()
void onRollback()
int update(Uri uri, ContentValues values, String selection, String[] selectionArgs)
Protected Methods
void beforeTransactionCommit()
abstract int deleteInTransaction(Uri uri, String selection, String[] selectionArgs)
The equivalent of the delete(Uri, String, String[]) method, but invoked within a transaction.
SQLiteOpenHelper getDatabaseHelper()
abstract SQLiteOpenHelper getDatabaseHelper(Context context)
abstract Uri insertInTransaction(Uri uri, ContentValues values)
The equivalent of the insert(Uri, ContentValues) method, but invoked within a transaction.
abstract void notifyChange()
void onBeginTransaction()
void onEndTransaction()
abstract int updateInTransaction(Uri uri, ContentValues values, String selection, String[] selectionArgs)
The equivalent of the update(Uri, ContentValues, String, String[]) method, but invoked within a transaction.
[Expand]
Inherited Methods
From class android.content.ContentProvider
From class java.lang.Object
From interface android.content.ComponentCallbacks
From interface android.content.ComponentCallbacks2
From interface android.database.sqlite.SQLiteTransactionListener

Fields

protected SQLiteDatabase mDb

Public Constructors

public SQLiteContentProvider ()

Public Methods

public int bulkInsert (Uri uri, ContentValues[] values)

public int delete (Uri uri, String selection, String[] selectionArgs)

public Uri insert (Uri uri, ContentValues values)

public void onBegin ()

public void onCommit ()

public boolean onCreate ()

public void onRollback ()

public int update (Uri uri, ContentValues values, String selection, String[] selectionArgs)

Protected Methods

protected void beforeTransactionCommit ()

protected abstract int deleteInTransaction (Uri uri, String selection, String[] selectionArgs)

The equivalent of the delete(Uri, String, String[]) method, but invoked within a transaction.

protected SQLiteOpenHelper getDatabaseHelper ()

protected abstract SQLiteOpenHelper getDatabaseHelper (Context context)

protected abstract Uri insertInTransaction (Uri uri, ContentValues values)

The equivalent of the insert(Uri, ContentValues) method, but invoked within a transaction.

protected abstract void notifyChange ()

protected void onBeginTransaction ()

protected void onEndTransaction ()

protected abstract int updateInTransaction (Uri uri, ContentValues values, String selection, String[] selectionArgs)

The equivalent of the update(Uri, ContentValues, String, String[]) method, but invoked within a transaction.