Code example for ContentValues

Methods: containsKeygetAsInteger

0
 
        // Back up the new bookmark set if we just inserted one. 
        // A row created when bookmarks are added from scratch will have 
        // bookmark=1 in the initial value set. 
        if (isBookmarkTable
                && initialValues.containsKey(BookmarkColumns.BOOKMARK)
                && initialValues.getAsInteger(BookmarkColumns.BOOKMARK) != 0) {
            mBackupManager.dataChanged();
        } 
        return uri;
    } 
 
    @Override 
    public int delete(Uri url, String where, String[] whereArgs) {
        SQLiteDatabase db = mOpenHelper.getWritableDatabase();
 
        int match = URI_MATCHER.match(url);
        if (match == -1 || match == URI_MATCH_SUGGEST) {
            throw new IllegalArgumentException("Unknown URL");
        }