当前位置: 首页>>代码示例>>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;未经允许,请勿转载。