Code example for SQLException

		if (rowId > 0) {
			Uri noteUri = ContentUris.withAppendedId(uri, rowId);
			getContext().getContentResolver().notifyChange(noteUri, null);
			return noteUri;
		} else 
			throw new SQLException("Failed to insert row into " + uri);
	public int delete(Uri uri, String selection, String[] selectionArgs) {		
		final SQLiteDatabase db = dbHelper.getWritableDatabase();
		final SelectionBuilder builder = buildSelectionFromUri(uri);
		int count = builder.where(selection, selectionArgs).delete(db);
		getContext().getContentResolver().notifyChange(uri, null);
		return count;
	public int update(Uri uri, ContentValues values, String selection,
Connect your IDE to all the code out there  Get Codota for Java