netsurfers.gicp.net.provider
类 DatabaseProvider

java.lang.Object
  继承者 ContentProvider
      继承者 netsurfers.gicp.net.provider.DatabaseProvider

public class DatabaseProvider
extends ContentProvider

DatabaseProvider extend from ContentProvider which can query, insert, update, delete the data

作者:
Ziliang Wang, E-mail: Lional.King@gmail.com

字段摘要
static Uri CONTENT_URI
           
 
构造方法摘要
DatabaseProvider()
           
 
方法摘要
 int delete(Uri uri, String where, String[] whereArgs)
          A request to delete one or more rows
 String getType(Uri uri)
          Return the MIME type of the data at the given URI
 Uri insert(Uri uri, ContentValues initialValues)
          Implement this to insert a new row
 boolean onCreate()
          Called when the provider is being started
 Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder)
          Receives a query request from a client in a local process, and returns a Cursor
 int update(Uri uri, ContentValues values, String selection, String[] selectionArgs)
          Update a content URI
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

CONTENT_URI

public static final Uri CONTENT_URI
构造方法详细信息

DatabaseProvider

public DatabaseProvider()
方法详细信息

delete

public int delete(Uri uri,
                  String where,
                  String[] whereArgs)
A request to delete one or more rows

另请参见:
ContentProvider

getType

public String getType(Uri uri)
Return the MIME type of the data at the given URI

另请参见:
ContentProvider

insert

public Uri insert(Uri uri,
                  ContentValues initialValues)
Implement this to insert a new row

另请参见:
ContentProvider

onCreate

public boolean onCreate()
Called when the provider is being started

另请参见:
ContentProvider

query

public Cursor query(Uri uri,
                    String[] projection,
                    String selection,
                    String[] selectionArgs,
                    String sortOrder)
Receives a query request from a client in a local process, and returns a Cursor

另请参见:
ContentProvider

update

public int update(Uri uri,
                  ContentValues values,
                  String selection,
                  String[] selectionArgs)
Update a content URI

另请参见:
ContentProvider