@Override protected SelectionBuilder buildExpandedSelection(Uri uri) { int gameId = Games.getGameId(uri); return new SelectionBuilder() .table(Tables.GAMES_ARTISTS_JOIN_ARTISTS) .mapToTable(Artists._ID, Tables.ARTISTS) .mapToTable(Artists.ARTIST_ID, Tables.ARTISTS) .mapToTable(SyncColumns.UPDATED, Tables.ARTISTS) .whereEquals(Tables.GAMES_ARTISTS + "." + GamesArtists.GAME_ID, gameId); }
@Override protected Uri insert(Context context, SQLiteDatabase db, Uri uri, ContentValues values) { values.put(GamesArtists.GAME_ID, Games.getGameId(uri)); long rowId = db.insertOrThrow(TABLE, null, values); return Games.buildArtistUri(rowId); }
@Override protected SelectionBuilder buildSimpleSelection(Uri uri) { int gameId = Games.getGameId(uri); return new SelectionBuilder().table(TABLE).whereEquals(GamesArtists.GAME_ID, gameId); }