Java Code Examples for android.database.Cursor.isAfterLast()

The following are Jave code examples for showing how to use isAfterLast() of the android.database.Cursor class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: mobile-store   File: LoggingQuery.java   View Source Code Vote up 7 votes
private String[] getExplainQueryPlan() {
    Cursor cursor = db.rawQuery("EXPLAIN QUERY PLAN " + query, queryArgs);
    String[] plan = new String[cursor.getCount()];
    cursor.moveToFirst();
    while (!cursor.isAfterLast()) {
        // The docs at https://sqlite.org/eqp.html talk about how the output format of
        // EXPLAIN QUERY PLAN can change between SQLite versions. This has been observed
        // between the sqlite versions on Android 2.3.3 and Android 5.0. However, it seems
        // that the last column is always the one with the interesting details that we wish
        // to log. If this fails for some reason, then hey, it is only for debug builds, right?
        if (cursor.getColumnCount() > 0) {
            int index = cursor.getColumnCount() - 1;
            plan[cursor.getPosition()] = cursor.getString(index);
        }
        cursor.moveToNext();
    }
    cursor.close();
    return plan;
}
 
Example 2
Project: grow-tracker-android   File: DBHelper.java   View Source Code Vote up 7 votes
public ArrayList<Plant> getAllPlants() {
    ArrayList<Plant> array_list = new ArrayList<Plant>();

    SQLiteDatabase db = this.getReadableDatabase();
    Cursor res =  db.rawQuery( "SELECT id, name, start_date, image FROM plants", null );
    res.moveToFirst();

    while(res.isAfterLast() == false) {
        int id = res.getInt(res.getColumnIndex("id"));
        String name = res.getString(res.getColumnIndex(PLANTS_COLUMN_NAME));
        String startDate = res.getString(res.getColumnIndex(PLANTS_COLUMN_START_DATE));
        String image = res.getString(res.getColumnIndex(PLANTS_COLUMN_IMAGE));
        Plant p = new Plant(id, name, startDate, image);
        array_list.add(p);
        res.moveToNext();
    }
    db.close();
    return array_list;
}
 
Example 3
Project: Mp3Player   File: DataBaseClass.java   View Source Code Vote up 7 votes
public int findtables(String tablename)
{
    int flag = 0 ;
    SQLiteDatabase db= getReadableDatabase();
    String query = "select name from sqlite_master where type='table'";
    Cursor c= db.rawQuery(query,null);
    c.moveToFirst();
    while(!c.isAfterLast())
    {
        String s = c.getString(c.getColumnCount()-1);
        Log.d("table "+c.getPosition()," name "+s);
        if(s.equals(tablename))
            flag = 1;

        c.moveToNext();
    }
    c.close();
    return flag ;
}
 
Example 4
Project: QuranAndroid   File: DatabaseAccess.java   View Source Code Vote up 7 votes
/**
 * Function to get sura name
 *
 * @param suraID Sura id
 * @return Object of sura name
 */
public Sora getSuraNameByID(int suraID) {

    Sora sora = null;
    try {
        SQLiteDatabase db = openDB(MAIN_DATABASE);
        String sql = "select * from sora where soraid = " + suraID + " ; ";
        Cursor cursor = db.rawQuery(sql, null);
        cursor.moveToFirst();
        while (!cursor.isAfterLast()) {
            sora = new Sora(cursor.getString(1), cursor.getString(2));
            cursor.moveToNext();
        }
        cursor.close();
        closeDB(db);

    } catch (Exception e) {
        e.printStackTrace();
    }
    return sora;

}
 
Example 5
Project: QuranAndroid   File: DatabaseAccess.java   View Source Code Vote up 6 votes
/**
 * Function to get sura name
 *
 * @param suraID Sura id
 * @return Object of sura name
 */
public Sora getSuraNameByID(int suraID) {

    Sora sora = null;
    try {
        SQLiteDatabase db = openDB(MAIN_DATABASE);
        String sql = "select * from sora where soraid = " + suraID + " ; ";
        Cursor cursor = db.rawQuery(sql, null);
        cursor.moveToFirst();
        while (!cursor.isAfterLast()) {
            sora = new Sora(cursor.getString(1), cursor.getString(2));
            cursor.moveToNext();
        }
        cursor.close();
        closeDB(db);

    } catch (Exception e) {
        e.printStackTrace();
    }
    return sora;

}
 
Example 6
Project: Android-Scrapper   File: DatabaseContract.java   View Source Code Vote up 6 votes
/**
 * Used to get games that are queued for today. Used in dashboard, creating game notifications and calculating no of games for each league while creating new grid.
 *
 * @return List of games for today.
 */

public List<Game> selectUpcomingGames(int lag) {
    SQLiteDatabase db = getReadableDatabase();

    String[] selectionArgs = {
            String.valueOf(new DateTime(Constants.DATE.VEGAS_TIME_ZONE).minusDays(Constants.DATE_LAG + lag).withTimeAtStartOfDay().getMillis())};
    List<Game> data = new LinkedList<>();
    Cursor res = db.rawQuery("SELECT " + GameEntry._ID +
                    " FROM " + GameEntry.TABLE_NAME +
                    " WHERE " + GameEntry.COLUMN_GAME_ADD_DATE + EQUAL_SEP +
                    " ORDER BY " + GameEntry.COLUMN_GAME_DATE_TIME,
            selectionArgs);
    res.moveToFirst();

    while (!res.isAfterLast()) {
        Game game = onSelectGame(String.valueOf(res.getInt(res.getColumnIndex(GameEntry._ID))));
        if (checkBid(game) && checkGameValidity(game, lag)) {
            data.add(game);
        }
        res.moveToNext();

    }
    res.close();
    return data;
}
 
Example 7
Project: QuranAndroid   File: DatabaseAccess.java   View Source Code Vote up 6 votes
/**
 * Function to get all translation books , info and status
 *
 * @return List of translations
 */
public List<TranslationBook> getAllTranslations() {
    List<TranslationBook> translationBooks = new ArrayList<TranslationBook>();
    SQLiteDatabase db = openDB(MAIN_DATABASE);
    String sql = "select * from tafaseer ;";
    Cursor cursor = db.rawQuery(sql, null);
    cursor.moveToFirst();
    while (!cursor.isAfterLast()) {
        translationBooks.add(new TranslationBook(cursor.getInt(0),
                cursor.getString(1),
                cursor.getString(2) == null ? "" : cursor.getString(2),
                cursor.getInt(3),
                false,
                false));
        cursor.moveToNext();
    }

    cursor.close();
    closeDB(db);
    return translationBooks;
}
 
Example 8
Project: Notepad-For-Android   File: NDb.java   View Source Code Vote up 5 votes
public ArrayList getAll() {
    ArrayList array_list = new ArrayList();
    SQLiteDatabase db = this.getReadableDatabase();
    Cursor res = db.rawQuery("select * from " + mynotes, null);
    res.moveToFirst();
    while (res.isAfterLast() == false) {
        array_list.add(res.getString(res.getColumnIndex("_id")));
        array_list.add(res.getString(res.getColumnIndex(remark)));
        array_list.add(res.getString(res.getColumnIndex(dates)));
        array_list.add(res.getString(res.getColumnIndex(name)));
        res.moveToNext();
    }
    return array_list;
}
 
Example 9
Project: ThunderMusic   File: MusicUtils.java   View Source Code Vote up 5 votes
/**
 * Same as makePlaylistMenu, but only for online provides
 *
 * @param context The context to use for creating the menu items
 * @param sub     The submenu to add the items to.
 */
public static void makePlaylistMenuOnline(Context context, SubMenu sub) {
    String[] cols = new String[]{MediaStore.Audio.Playlists._ID,
            MediaStore.Audio.Playlists.NAME};
    ContentResolver resolver = context.getContentResolver();
    if (resolver == null) {
    } else {
        String whereclause = MediaStore.Audio.Playlists.NAME + " != ''";
        Cursor cur = resolver.query(
                MediaStore.Audio.Playlists.EXTERNAL_CONTENT_URI, cols,
                whereclause, null, MediaStore.Audio.Playlists.NAME);
        sub.clear();
        sub.add(1, Defs.QUEUE, 0, R.string.queue);
        sub.add(1, Defs.NEW_PLAYLIST, 0, R.string.new_playlist);
        if (cur != null && cur.getCount() > 0) {
            // sub.addSeparator(1, 0);
            cur.moveToFirst();
            while (!cur.isAfterLast()) {
                if (cur.getLong(0) == MusicUtils.getPlaylistiD(cur
                        .getString(1))) {
                    Intent intent = new Intent();
                    intent.putExtra("playlist", cur.getLong(0));
                    intent.putExtra("name", cur.getString(1));
                    // if (cur.getInt(0) == mLastPlaylistSelected) {
                    // sub.add(0, MusicBaseActivity.PLAYLIST_SELECTED,
                    // cur.getString(1)).setIntent(intent);
                    // } else {
                    sub.add(1, Defs.PLAYLIST_SELECTED, 0, cur.getString(1))
                            .setIntent(intent);
                    // }
                }
                cur.moveToNext();
            }
        }
        if (cur != null) {
            cur.close();
        }
    }
}
 
Example 10
Project: CSipSimple   File: CallLogAdapter.java   View Source Code Vote up 5 votes
/**
 * Returns the call ids for the given number of items in the cursor.
 * <p>
 * It uses the next {@code count} rows in the cursor to extract the types.
 * <p>
 * It position in the cursor is unchanged by this function.
 */
private long[] getCallIds(Cursor cursor, int count) {
    int position = cursor.getPosition();
    long[] callIds = new long[count];
    for (int index = 0; index < count; ++index) {
        if(!cursor.isAfterLast()) {
            callIds[index] = cursor.getLong(cursor.getColumnIndex(CallLog.Calls._ID));
        }
        cursor.moveToNext();
    }
    cursor.moveToPosition(position);
    return callIds;
}
 
Example 11
Project: Book-Tea_Project   File: LoginActivity.java   View Source Code Vote up 5 votes
@Override
public void onLoadFinished(Loader<Cursor> cursorLoader, Cursor cursor) {
    List<String> emails = new ArrayList<>();
    cursor.moveToFirst();
    while (!cursor.isAfterLast()) {
        emails.add(cursor.getString(ProfileQuery.ADDRESS));
        cursor.moveToNext();
    }

    addEmailsToAutoComplete(emails);
}
 
Example 12
Project: orgzly-android   File: DatabaseMigration.java   View Source Code Vote up 5 votes
private static void movePropertiesFromBody(SQLiteDatabase db) {
    Cursor cursor = db.query("notes", new String[] { "_id", "content" }, null, null, null, null, null);

    try {
        for (cursor.moveToFirst(); !cursor.isAfterLast(); cursor.moveToNext()) {
            long noteId = cursor.getLong(0);
            String content = cursor.getString(1);

            if (!TextUtils.isEmpty(content)) {
                StringBuilder newContent = new StringBuilder();
                List<String[]> properties = getPropertiesFromContent(content, newContent);

                if (properties.size() > 0) {
                    int pos = 1;
                    for (String[] property: properties) {
                        long nameId = DbPropertyName.getOrInsert(db, property[0]);
                        long valueId = DbPropertyValue.getOrInsert(db, property[1]);
                        long propertyId = DbProperty.getOrInsert(db, nameId, valueId);
                        DbNoteProperty.getOrInsert(db, noteId, pos++, propertyId);
                    }

                    /* Update content and its line count */
                    ContentValues values = new ContentValues();
                    values.put("content", newContent.toString());
                    values.put("content_line_count", MiscUtils.lineCount(newContent.toString()));
                    db.update("notes", values, "_id = " + noteId, null);
                }
            }
        }
    } finally {
        cursor.close();
    }
}
 
Example 13
Project: QuranAndroid   File: DatabaseAccess.java   View Source Code Vote up 5 votes
/**
 * Function to get all page ayaat translation
 *
 * @param page Page number
 * @param book TranslationBook book number
 * @return Page information with translation
 */
public PageTranslation PageTranslation(int page, int book) {

    PageTranslation pageTranslation = null;
    List<AyaTranslation> ayaTranslations = new ArrayList<AyaTranslation>();
    String soraName = "";
    int jozaID = -1;
    int soraId = -1;
    SQLiteDatabase db = openDB(TRANSLATION_DATABASE);

    String sql = "select b.name , a.page , a.soraid , a.ayaid , a.joza " +
            "from aya a , sora b where page = " + page + " and b.soraid = a.soraid order by a.soraid  ;";
    Cursor cursor = db.rawQuery(sql, null);
    cursor.moveToFirst();
    if (!cursor.isAfterLast()) {
        soraName = cursor.getString(0);
        jozaID = cursor.getInt(4);
        ayaTranslations.add(getAyaTranslation(cursor.getInt(2),
                cursor.getInt(3),
                book));
        cursor.moveToNext();
    }
    pageTranslation = new PageTranslation(soraName,
            soraId,
            page,
            jozaID,
            ayaTranslations);

    cursor.close();
    closeDB(db);
    return pageTranslation;
}
 
Example 14
Project: Shared-Route   File: LoginActivity.java   View Source Code Vote up 5 votes
@Override
public void onLoadFinished(Loader<Cursor> cursorLoader, Cursor cursor) {
    List<String> emails = new ArrayList<>();
    cursor.moveToFirst();
    while (!cursor.isAfterLast()) {
        emails.add(cursor.getString(ProfileQuery.ADDRESS));
        cursor.moveToNext();
    }
    addEmailsToAutoComplete(emails);
}
 
Example 15
Project: RoadLab-Pro   File: IssuesDAO.java   View Source Code Vote up 5 votes
public List<IssuesModel> getAllIssues() {
    final List<IssuesModel> listIssues = new ArrayList<>();
    final Cursor cursor = getAllIssuesCursor();
    if (cursor != null) {
        cursor.moveToFirst();
        while (!cursor.isAfterLast()) {
            final IssuesModel issuesModel = cursorToIssues(cursor);
            listIssues.add(issuesModel);
            cursor.moveToNext();
        }
        cursor.close();
    }
    return listIssues;
}
 
Example 16
Project: ObjectBoxDebugBrowser   File: ContactDBHelper.java   View Source Code Vote up 5 votes
public ArrayList<String> getAllCotacts() {
    ArrayList<String> arrayList = new ArrayList<>();

    //hp = new HashMap();
    SQLiteDatabase db = this.getReadableDatabase();
    Cursor res = db.rawQuery("select * from contacts", null);
    res.moveToFirst();

    while (!res.isAfterLast()) {
        arrayList.add(res.getString(res.getColumnIndex(CONTACTS_COLUMN_NAME)));
        res.moveToNext();
    }
    return arrayList;
}
 
Example 17
Project: AstronomyTourPadova   File: AtUtils.java   View Source Code Vote up 4 votes
public static List<AtCategory> getAllCategories(Context context) {
    Log.d(TAG, "getAllCategories()");
    List<AtCategory> categories = new ArrayList<>();
    
    // Getting points from the DB
    String[] columns = new String[]{
        MySQLiteHelper.COLUMN_CATEGORY_ID,
        MySQLiteHelper.COLUMN_CATEGORY_NAME,
        MySQLiteHelper.GROUP_CONCAT_POINT,
    };
    
    String selection = "";
    String[] selectionArgs = new String[]{};
    
    
    Cursor cursor = context.getContentResolver().query(
        LocalContentProvider.URI_CATEGORY,
        columns,
        selection,
        selectionArgs,
        MySQLiteHelper.COLUMN_CATEGORY_ID + " ASC" // returning the points in the correct order (position)
    );
    
    // Cycling on the results
    if (cursor != null && cursor.getCount() > 0) {
        while (cursor.moveToNext()) {
            if (cursor.isAfterLast()) {
                break;
            }
            
            // Saving the correct column
            int pos_i = cursor.getColumnIndex(MySQLiteHelper.COLUMN_CATEGORY_ID);
            int pos_n = cursor.getColumnIndex(MySQLiteHelper.COLUMN_CATEGORY_NAME);
            int pos_p = cursor.getColumnIndex(MySQLiteHelper.GROUP_CONCAT_POINT);
            
            // Initializing variables
            int id = cursor.getInt(pos_i);
            String n = cursor.getString(pos_n);
            String p = cursor.getString(pos_p);
            
            if (p != null) {
                String[] pointIds = p.split(MySQLiteHelper.GROUP_CONCAT_DIVIDER);
                Log.d("PERCORSI - p:", p.toString());
                Log.d("PERCORSI - pointIds:", pointIds.toString());
                
                // Creating the point
                AtCategory atCategory = new AtCategory(id, n, pointIds);
                Log.d("PERCORSI - NewCategory:", atCategory.toString());
                
                // Adding the point to the list
                try {
                    categories.add(atCategory);
                } catch (NullPointerException e) {
                    Log.d(TAG, e.toString());
                }
            }
        }
    } else {
        // cursor is null or empty
        Log.e(TAG, "getLocalPointsList() | Cursor is null or empty");
    }
    cursor.close();
    //Log.d(TAG, "getLocalPointsList() -> Points List: " + points.toString());
    
    return categories;
}
 
Example 18
Project: orgzly-android   File: ProviderFilters.java   View Source Code Vote up 4 votes
/**
 * Swaps position of target filter and the one above or below it.
 * Also fixes all positions which is required as default filters were both added with position 1.
 *
 * FIXME: Slow and horrible.
 */
static int moveFilter(SQLiteDatabase db, long id, boolean up) {
    Map<Long, Integer> originalPositions = new HashMap<>();
    Map<Long, Integer> newPositions = new HashMap<>();

    Cursor cursor = queryAll(db);

    try {
        int i = 1;
        long lastId = 0;
        for (cursor.moveToFirst(); !cursor.isAfterLast(); cursor.moveToNext()) {
            long thisId = cursor.getLong(0);
            int thisPos = cursor.getInt(1);

            originalPositions.put(thisId, thisPos);
            newPositions.put(thisId, i);

            if (up) {
                if (thisId == id && lastId != 0) {
                    newPositions.put(thisId, i - 1);
                    newPositions.put(lastId, i);
                }

                lastId = thisId;
                i++;

            } else {
                if (lastId != 0) {
                    newPositions.put(thisId, i - 1);
                    newPositions.put(lastId, i);
                    lastId = 0;
                }

                if (thisId == id) {
                    lastId = thisId;
                }

                i++;
            }
        }
    } finally {
        cursor.close();
    }

    updateChangedPositions(db, originalPositions, newPositions);

    return 1;
}
 
Example 19
Project: musicplayer   File: MvFragment.java   View Source Code Vote up 4 votes
@Override
public void run() {

    // 如果有sd卡(外部存储卡)
    if (android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED)) {
        Uri originalUri = MediaStore.Video.Media.EXTERNAL_CONTENT_URI;
        ContentResolver cr =getActivity().getApplicationContext().getContentResolver();
        Cursor cursor = cr.query(originalUri, null, null, null, null);
        if (cursor == null) {
            return;
        }
        for (cursor.moveToFirst(); !cursor.isAfterLast(); cursor.moveToNext()) {
            String title = cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Video.Media.TITLE));
            String path = cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Video.Media.DATA));
            long size = cursor.getLong(cursor.getColumnIndexOrThrow(MediaStore.Video.Media.SIZE));
            long duration = cursor.getInt(cursor.getColumnIndexOrThrow(MediaStore.Video.Media.DURATION));
            //获取当前Video对应的Id,然后根据该ID获取其缩略图的uri
            int id = cursor.getInt(cursor.getColumnIndexOrThrow(MediaStore.Video.Media._ID));
            String[] selectionArgs = new String[] { id + "" };
            String[] thumbColumns = new String[] { MediaStore.Video.Thumbnails.DATA,
                    MediaStore.Video.Thumbnails.VIDEO_ID };
            String selection = MediaStore.Video.Thumbnails.VIDEO_ID + "=?";

            String uri_thumb = "";
            Cursor thumbCursor = (getActivity().getApplicationContext().getContentResolver()).query(
                    MediaStore.Video.Thumbnails.EXTERNAL_CONTENT_URI, thumbColumns, selection, selectionArgs,
                    null);

            if (thumbCursor != null && thumbCursor.moveToFirst()) {
                uri_thumb = thumbCursor
                        .getString(thumbCursor.getColumnIndexOrThrow(MediaStore.Video.Thumbnails.DATA));

            }

            BitmapEntity bitmapEntity = new BitmapEntity(title, path, size, uri_thumb, duration);

            bit.add(bitmapEntity);

        }
        if (cursor != null) {
            cursor.close();
            mHandler.sendEmptyMessage(1);
        }
    }
}
 
Example 20
Project: mobile-store   File: AppProviderTest.java   View Source Code Vote up 4 votes
@Test
public void testCanUpdate() {
    insertApp("not installed", "not installed");
    insertAndInstallApp("installed, only one version available", 1, 1, false, 0);
    insertAndInstallApp("installed, already latest, no ignore", 10, 10, false, 0);
    insertAndInstallApp("installed, already latest, ignore all", 10, 10, true, 0);
    insertAndInstallApp("installed, already latest, ignore latest", 10, 10, false, 10);
    insertAndInstallApp("installed, already latest, ignore old", 10, 10, false, 5);
    insertAndInstallApp("installed, old version, no ignore", 5, 10, false, 0);
    insertAndInstallApp("installed, old version, ignore all", 5, 10, true, 0);
    insertAndInstallApp("installed, old version, ignore latest", 5, 10, false, 10);
    insertAndInstallApp("installed, old version, ignore newer, but not latest", 5, 10, false, 8);

    ContentResolver r = context.getContentResolver();

    // Can't "update", although can "install"...
    App notInstalled = AppProvider.Helper.findSpecificApp(r, "not installed", 1, Cols.ALL);
    assertFalse(notInstalled.canAndWantToUpdate(context));

    assertResultCount(contentResolver, 2, AppProvider.getCanUpdateUri(), PROJ);
    assertResultCount(contentResolver, 9, AppProvider.getInstalledUri(), PROJ);

    App installedOnlyOneVersionAvailable = AppProvider.Helper.findSpecificApp(r, "installed, only one version available", 1, Cols.ALL);
    App installedAlreadyLatestNoIgnore = AppProvider.Helper.findSpecificApp(r, "installed, already latest, no ignore", 1, Cols.ALL);
    App installedAlreadyLatestIgnoreAll = AppProvider.Helper.findSpecificApp(r, "installed, already latest, ignore all", 1, Cols.ALL);
    App installedAlreadyLatestIgnoreLatest = AppProvider.Helper.findSpecificApp(r, "installed, already latest, ignore latest", 1, Cols.ALL);
    App installedAlreadyLatestIgnoreOld = AppProvider.Helper.findSpecificApp(r, "installed, already latest, ignore old", 1, Cols.ALL);

    assertFalse(installedOnlyOneVersionAvailable.canAndWantToUpdate(context));
    assertFalse(installedAlreadyLatestNoIgnore.canAndWantToUpdate(context));
    assertFalse(installedAlreadyLatestIgnoreAll.canAndWantToUpdate(context));
    assertFalse(installedAlreadyLatestIgnoreLatest.canAndWantToUpdate(context));
    assertFalse(installedAlreadyLatestIgnoreOld.canAndWantToUpdate(context));

    App installedOldNoIgnore = AppProvider.Helper.findSpecificApp(r, "installed, old version, no ignore", 1, Cols.ALL);
    App installedOldIgnoreAll = AppProvider.Helper.findSpecificApp(r, "installed, old version, ignore all", 1, Cols.ALL);
    App installedOldIgnoreLatest = AppProvider.Helper.findSpecificApp(r, "installed, old version, ignore latest", 1, Cols.ALL);
    App installedOldIgnoreNewerNotLatest = AppProvider.Helper.findSpecificApp(r, "installed, old version, ignore newer, but not latest", 1, Cols.ALL);

    assertTrue(installedOldNoIgnore.canAndWantToUpdate(context));
    assertFalse(installedOldIgnoreAll.canAndWantToUpdate(context));
    assertFalse(installedOldIgnoreLatest.canAndWantToUpdate(context));
    assertTrue(installedOldIgnoreNewerNotLatest.canAndWantToUpdate(context));

    Cursor canUpdateCursor = r.query(AppProvider.getCanUpdateUri(), Cols.ALL, null, null, null);
    assertNotNull(canUpdateCursor);
    canUpdateCursor.moveToFirst();
    List<String> canUpdateIds = new ArrayList<>(canUpdateCursor.getCount());
    while (!canUpdateCursor.isAfterLast()) {
        canUpdateIds.add(new App(canUpdateCursor).packageName);
        canUpdateCursor.moveToNext();
    }
    canUpdateCursor.close();

    String[] expectedUpdateableIds = {
            "installed, old version, no ignore",
            "installed, old version, ignore newer, but not latest",
    };

    assertContainsOnly(expectedUpdateableIds, canUpdateIds);
}