public static final Sequence LOC_SEQ = new Sequence("LOC_SEQ");
public static final Sequence RUN_SEQ = new Sequence("RUN_SEQ");
- public static final String BUGID = "BUGID";
- public static final String CATEGORY = "CATEGORY";
- public static final String CATEGORYID = "CATEGORYID";
- public static final String CLASSNAME = "CLASSNAME";
- public static final String ENDLINE = "ENDLINE";
- public static final String FIRSTLOCID = "FIRSTLOCID";
- public static final String FOUNDID = "FOUNDID";
- public static final String LOCID = "LOCID";
- public static final String METHODNAME = "METHODNAME";
- public static final String RUNID = "RUNID";
- public static final String SECONDLOCID = "SECONDLOCID";
- public static final String STARTLINE = "STARTLINE";
- public static final String THIRDLOCID = "THIRDLOCID";
- public static final String TYPE = "TYPE";
+ public static final Column BUGID = new Column("BUGID", INTEGER, -1, NOT_NULL);
+ public static final Column CATEGORY = new Column("CATEGORY", VARCHAR, 80, NOT_NULL);
+ public static final Column CATEGORYID = new Column("CATEGORYID", INTEGER, -1, NOT_NULL);
+ public static final Column CLASSNAME = new Column("CLASSNAME", VARCHAR, 256, NOT_NULL);
+ public static final Column ENDLINE = new Column("ENDLINE", INTEGER, -1, NULL);
+ public static final Column ENDTIME = new Column("ENDTIME", TIMESTAMPTZ, -1, NOT_NULL);
+ public static final Column FIRSTLOCID = new Column("FIRSTLOCID", INTEGER, -1, NOT_NULL);
+ public static final Column FOUNDID = new Column("FOUNDID", INTEGER, -1, NOT_NULL);
+ public static final Column LOCID = new Column("LOCID", INTEGER, -1, NOT_NULL);
+ public static final Column METHODNAME = new Column("METHODNAME", VARCHAR, 256, NULL);
+ public static final Column RUNID = new Column("RUNID", INTEGER, -1, NOT_NULL);
+ public static final Column SECONDLOCID = new Column("SECONDLOCID", INTEGER, -1, NULL);
+ public static final Column STARTLINE = new Column("STARTLINE", INTEGER, -1, NULL);
+ public static final Column STARTTIME = new Column("STARTTIME", TIMESTAMPTZ, -1, NOT_NULL);
+ public static final Column THIRDLOCID = new Column("THIRDLOCID", INTEGER, -1, NULL);
+ public static final Column TYPE = new Column("TYPE", VARCHAR, 80, NOT_NULL );
+ public static final Column VERSION = new Column("VERSION", VARCHAR, 32, NULL);
- // Define each table as follows:
- // {
- // { table_name },
- // { column_name, type, width (-1 for default), null/not_null }
- // }
- private static final Object[][] BUGS_DEFN =
- {
- // Description of each possible bug
- { "BUG" },
- { BUGID, INTEGER, -1, NOT_NULL },
- { TYPE, VARCHAR, 80, NOT_NULL }
- };
- private static final Object[][] CATEGORIES_DEFN =
- {
- // Description of each possible bug category
- { "CATEGORIES" },
- { CATEGORYID, INTEGER, -1, NOT_NULL },
- { CATEGORY, VARCHAR, 80, NOT_NULL }
- };
- private static final Object[][] FOUND_DEFN =
- {
- // One BugInstance, found during an analysis
- { "FOUND" },
- { FOUNDID, INTEGER, -1, NOT_NULL },
- { BUGID, INTEGER, -1, NOT_NULL },
- { CATEGORYID, INTEGER, -1, NOT_NULL },
- { FIRSTLOCID, INTEGER, -1, NOT_NULL },
- { SECONDLOCID, INTEGER, -1, NULL },
- { THIRDLOCID, INTEGER, -1, NULL }
- };
- private static final Object[][] LOCATIONS_DEFN =
- {
- // Location in the source code referenced by a BugInstance
- { "LOCATION" },
- { LOCID, INTEGER, -1, NOT_NULL },
- { CLASSNAME, VARCHAR, 256, NOT_NULL },
- { METHODNAME, VARCHAR, 256, NULL },
- { STARTLINE, INTEGER, -1, NULL },
- { ENDLINE, INTEGER, -1, NULL }
- };
- private static final Object[][] RUNS_DEFN =
- {
- // Runs of FindBugs, normally one per build version
- { "RUN" },
- { RUNID, INTEGER, -1, NOT_NULL },
- { "VERSION", VARCHAR, 32, NULL },
- { "STARTTIME", TIMESTAMPTZ, -1, NOT_NULL },
- { "ENDTIME", TIMESTAMPTZ, -1, NOT_NULL }
- };
-
- public static final Table BUGS = Table.construct(BUGS_DEFN);
- public static final Table CATEGORIES = Table.construct(CATEGORIES_DEFN);
- public static final Table FOUND = Table.construct(FOUND_DEFN);
- public static final Table LOCATIONS = Table.construct(LOCATIONS_DEFN);
- public static final Table RUNS = Table.construct(RUNS_DEFN);
+ private static final Column[] BUGS_COLS = { BUGID, TYPE };
+ private static final Column[] CATEGORIES_COLS = { CATEGORYID, CATEGORY };
+ private static final Column[] FOUND_COLS = { FOUNDID, BUGID, CATEGORYID, FIRSTLOCID, SECONDLOCID, THIRDLOCID };
+ private static final Column[] LOCATIONS_COLS = { LOCID, CLASSNAME, METHODNAME, STARTLINE, ENDLINE };
+ private static final Column[] RUNS_COLS = { RUNID, VERSION, STARTTIME, ENDTIME };
+
+ public static final Table BUGS = new Table("BUGS", BUGS_COLS);
+ public static final Table CATEGORIES = new Table("CATEGORIES", CATEGORIES_COLS);
+ public static final Table FOUND = new Table("FOUND", FOUND_COLS);
+ public static final Table LOCATIONS = new Table("LOCATIONS", LOCATIONS_COLS);
+ public static final Table RUNS = new Table("RUNS", RUNS_COLS);
private static final Sequence[] SEQUENCES = {
BUG_SEQ,