In other words, this method could be something like:
```java
    public void orderLists() {
        SQLiteDatabase db = this.getWritableDatabase();

        Cursor cursor = db.query(DBConstants.ShoppingListsCols.TABLE_NAME, null,
                null, null, null, null, DBConstants.ShoppingListsCols.TITLE);

        if (cursor == null) {
            throw new RuntimeException();
        }
        ArrayList<ShoppingList> lists = new ArrayList<ShoppingList>();
        try {
            int faveOrder = 0;
            int unfaveOrder = 0;
            while (cursor.moveToNext()) {
                ShoppingList list = new ShoppingList();
                list.id = cursor.getInt(cursor.getColumnIndexOrThrow(DBConstants.ShoppingListsCols._ID));
                list.title = cursor.getString(cursor.getColumnIndexOrThrow(DBConstants.ShoppingListsCols.TITLE));
                list.favorite = cursor.getInt(cursor.getColumnIndexOrThrow(DBConstants.ShoppingListsCols.IS_FAVORITE));
                list.order = list.favorite == ShoppingList.FAVORITE ? faveOrder++ : unfaveOrder++;
                lists.add(list);
            }

        } finally {
            cursor.close();
        }
        db.close();

        // Even this could go into the loop above if updateList() didn't close the DB...
        for (ShoppingList list : lists) {
            updateList(list);
        }
    }
```