Add unit tests. Make DbStore handle cases where the bug type or category
[cfb.git] / prod / net / jaekl / cfb / xml / messages / BugPattern.java
index 82ada92f7f69cbf41cf3379c9f7fbfbe0675bdc5..1493ac6381b43c66d1999ddd55bc6c68bd2318d9 100644 (file)
@@ -16,22 +16,34 @@ public class BugPattern extends ParseResult {
        static final String[] INTERNAL = { SHORT, LONG, DETAILS };
        static final Object[][] EXTERNAL = {  };
        
+       public static final BugPattern UNKNOWN = new BugPattern(-2); 
+       
        String m_type;
        String m_short;
        String m_long;
        String m_details;
+       long m_id;
        
-       public BugPattern(String tagName, String[] internalMemberTags, Object[][] externalParserTags
+       public BugPattern() 
        {
-               super(tagName, internalMemberTags, externalParserTags);
+               super(TAG, INTERNAL, EXTERNAL);
+               m_id = (-1);
                m_type = m_short = m_long = m_details = "";
        }
        
+       BugPattern(long id) {
+               this();
+               m_id = id;
+       }
+       
        public String getType() { return m_type; }
        public String getShort() { return m_short; }
        public String getLong() { return m_long; }
        public String getDetails() { return m_details; }
 
+       public void setId(long id) { m_id = id; }
+       public long getId() { return m_id; }
+       
        @Override
        public void endContents(String uri, String localName, String qName, String chars) throws XmlParseException 
        {