當前位置: 首頁>>代碼示例>>Java>>正文


Java SelectionBuilder類代碼示例

本文整理匯總了Java中com.google.android.apps.iosched.util.SelectionBuilder的典型用法代碼示例。如果您正苦於以下問題:Java SelectionBuilder類的具體用法?Java SelectionBuilder怎麽用?Java SelectionBuilder使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


SelectionBuilder類屬於com.google.android.apps.iosched.util包,在下文中一共展示了SelectionBuilder類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: delete

import com.google.android.apps.iosched.util.SelectionBuilder; //導入依賴的package包/類
/** {@inheritDoc} */
@Override
public int delete(Uri uri, String selection, String[] selectionArgs) {
    LOGV(TAG, "delete(uri=" + uri + ")");
    if (uri == ScheduleContract.BASE_CONTENT_URI) {
        // Handle whole database deletes (e.g. when signing out)
        deleteDatabase();
        getContext().getContentResolver().notifyChange(uri, null, false);
        return 1;
    }
    final SQLiteDatabase db = mOpenHelper.getWritableDatabase();
    final SelectionBuilder builder = buildSimpleSelection(uri);
    int retVal = builder.where(selection, selectionArgs).delete(db);
    getContext().getContentResolver().notifyChange(uri, null,
            !ScheduleContract.hasCallerIsSyncAdapterParameter(uri));
    return retVal;
}
 
開發者ID:amardeshbd,項目名稱:google-iosched,代碼行數:18,代碼來源:ScheduleProvider.java

示例2: update

import com.google.android.apps.iosched.util.SelectionBuilder; //導入依賴的package包/類
/** {@inheritDoc} */
@Override
public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
    LOGV(TAG, "update(uri=" + uri + ", values=" + values.toString() + ")");
    final SQLiteDatabase db = mOpenHelper.getWritableDatabase();
    final int match = sUriMatcher.match(uri);
    if (match == SEARCH_INDEX) {
        // update the search index
        ScheduleDatabase.updateSessionSearchIndex(db);
        return 1;
    }

    final SelectionBuilder builder = buildSimpleSelection(uri);
    int retVal = builder.where(selection, selectionArgs).update(db, values);
    boolean syncToNetwork = !ScheduleContract.hasCallerIsSyncAdapterParameter(uri);
    notifyChange(uri, syncToNetwork);
    return retVal;
}
 
開發者ID:TheDeltaProgram,項目名稱:iosched2013,代碼行數:19,代碼來源:ScheduleProvider.java

示例3: delete

import com.google.android.apps.iosched.util.SelectionBuilder; //導入依賴的package包/類
/** {@inheritDoc} */
@Override
public int delete(Uri uri, String selection, String[] selectionArgs) {
    LOGV(TAG, "delete(uri=" + uri + ")");
    if (uri == ScheduleContract.BASE_CONTENT_URI) {
        // Handle whole database deletes (e.g. when signing out)
        deleteDatabase();
        notifyChange(uri, false);
        return 1;
    }
    final SQLiteDatabase db = mOpenHelper.getWritableDatabase();
    final SelectionBuilder builder = buildSimpleSelection(uri);
    int retVal = builder.where(selection, selectionArgs).delete(db);
    notifyChange(uri, !ScheduleContract.hasCallerIsSyncAdapterParameter(uri));
    return retVal;
}
 
開發者ID:TheDeltaProgram,項目名稱:iosched2013,代碼行數:17,代碼來源:ScheduleProvider.java

示例4: update

import com.google.android.apps.iosched.util.SelectionBuilder; //導入依賴的package包/類
/** {@inheritDoc} */
@Override
public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
    LOGV(TAG, "update(uri=" + uri + ", values=" + values.toString() + ")");
    final SQLiteDatabase db = mOpenHelper.getWritableDatabase();
    final SelectionBuilder builder = buildSimpleSelection(uri);
    int retVal = builder.where(selection, selectionArgs).update(db, values);
    boolean syncToNetwork = !ScheduleContract.hasCallerIsSyncAdapterParameter(uri);
    getContext().getContentResolver().notifyChange(uri, null, syncToNetwork);
    return retVal;
}
 
開發者ID:amardeshbd,項目名稱:google-iosched,代碼行數:12,代碼來源:ScheduleProvider.java


注:本文中的com.google.android.apps.iosched.util.SelectionBuilder類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。