本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}