本文整理匯總了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;
}