+ return domainsDatabase.rawQuery(GET_CURSOR_ORDERED_BY_DOMAIN, null);
+ }
+
+ public Cursor getDomainNameCursorOrderedByDomainExcept(int databaseId) {
+ // Get a readable database handle.
+ SQLiteDatabase domainsDatabase = this.getReadableDatabase();
+
+ // Prepare the SQL statement to select all rows except that with `databaseId`.
+ final String GET_CURSOR_ORDERED_BY_DOMAIN_EXCEPT = "SELECT " + _ID + ", " + DOMAIN_NAME +
+ " FROM " + DOMAINS_TABLE +
+ " WHERE " + _ID + " IS NOT " + databaseId +
+ " ORDER BY " + DOMAIN_NAME + " ASC";
+
+ // Return the results as a `Cursor`. The second argument is `null` because there are no `selectionArgs`. We can't close the `Cursor` because we need to use it in the calling activity.
+ return domainsDatabase.rawQuery(GET_CURSOR_ORDERED_BY_DOMAIN_EXCEPT, null);