Bug 1135900 - Add ReadingListItems.ALL_FIELDS. a=readinglist
authorRichard Newman <rnewman@mozilla.com>
Mon, 23 Feb 2015 15:07:55 -0800
changeset 257418 07f1fc72c886faef9bb7defb07d104adfdf3e95c
parent 257417 bfe706982340a3b069f0b249edfa81e1609e450f
child 257419 01ad6f6b479d7737901abb8f9fa22bb1bcb9b856
push id4610
push userjlund@mozilla.com
push dateMon, 30 Mar 2015 18:32:55 +0000
treeherdermozilla-beta@4df54044d9ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersreadinglist
bugs1135900
milestone38.0a2
Bug 1135900 - Add ReadingListItems.ALL_FIELDS. a=readinglist And fix REQUIRED_FIELDS, too.
mobile/android/base/db/BrowserContract.java
--- a/mobile/android/base/db/BrowserContract.java
+++ b/mobile/android/base/db/BrowserContract.java
@@ -410,17 +410,43 @@ public class BrowserContract {
         public static final int SYNC_CHANGE_FAVORITE_CHANGED = 1 << 1;    // => is_favorite
         public static final int SYNC_CHANGE_RESOLVED = 1 << 2;            // => is_article, resolved_{url,title}, excerpt, word_count
 
 
         public static final String DEFAULT_SORT_ORDER = CLIENT_LAST_MODIFIED + " DESC";
         public static final String[] DEFAULT_PROJECTION = new String[] { _ID, URL, TITLE, EXCERPT, WORD_COUNT };
 
         // Minimum fields required to create a reading list item.
-        public static final String[] REQUIRED_FIELDS = { Bookmarks.URL, Bookmarks.TITLE };
+        public static final String[] REQUIRED_FIELDS = { ReadingListItems.URL, ReadingListItems.TITLE };
+
+        // All fields that might be mapped from the DB into a record object.
+        public static final String[] ALL_FIELDS = {
+                EXCERPT,
+                CLIENT_LAST_MODIFIED,
+                GUID,
+                SERVER_LAST_MODIFIED,
+                SERVER_STORED_ON,
+                ADDED_ON,
+                MARKED_READ_ON,
+                IS_DELETED,
+                IS_ARCHIVED,
+                IS_UNREAD,
+                IS_ARTICLE,
+                IS_FAVORITE,
+                RESOLVED_URL,
+                RESOLVED_TITLE,
+                ADDED_BY,
+                MARKED_READ_BY,
+                WORD_COUNT,
+                READ_POSITION,
+                CONTENT_STATUS,
+
+                SYNC_STATUS,
+                SYNC_CHANGE_FLAGS,
+        };
 
         public static final String TABLE_NAME = "reading_list";
     }
 
     @RobocopTarget
     public static final class TopSites implements CommonColumns, URLColumns {
         private TopSites() {}