Add unit tests. Make DbStore handle cases where the bug type or category
[cfb.git] / prod / net / jaekl / cfb / xml / messages / BugCategory.java
index 757aacfb124472981e597da46b6c826da810e1ed..7adb0b515d816b403044b039318d4789ff95b9bb 100644 (file)
@@ -15,6 +15,8 @@ public class BugCategory extends ParseResult {
        static final String TAG = "BugCategory";
        static final String[] INTERNAL = { DESCRIPTION, ABBREVIATION, DETAILS };
        static final Object[][] EXTERNAL = { };
+       
+       public static final BugCategory UNKNOWN = new BugCategory(-2);
 
        String m_category;
        String m_descr;
@@ -25,9 +27,16 @@ public class BugCategory extends ParseResult {
        public BugCategory() 
        {
                super(TAG, INTERNAL, EXTERNAL);
+               m_id = (-1);
                m_category = m_descr = m_abbrev = m_details = "";
        }
        
+       BugCategory(long id)
+       {
+               this();
+               m_id = (-2); 
+       }
+       
        public String getCategory() { return m_category; }
        public String getDescr() { return m_descr; }
        public String getAbbrev() { return m_abbrev; }