2011-05-23 18:59:34 +00:00
|
|
|
package com.dougkeen.bart.data;
|
|
|
|
|
2012-10-02 04:03:08 +00:00
|
|
|
|
2011-05-27 21:06:58 +00:00
|
|
|
public enum RoutesColumns {
|
2012-01-02 23:08:43 +00:00
|
|
|
_ID("_id", "INTEGER", false),
|
|
|
|
FROM_STATION("FROM_STATION", "TEXT", false),
|
|
|
|
TO_STATION("TO_STATION", "TEXT", false),
|
|
|
|
FARE("FARE", "TEXT", true),
|
2012-04-13 01:07:55 +00:00
|
|
|
FARE_LAST_UPDATED("FARE_LAST_UPDATED", "INTEGER", true),
|
|
|
|
AVERAGE_TRIP_SAMPLE_COUNT("AVE_TRIP_SAMPLE_COUNT", "INTEGER", true),
|
|
|
|
AVERAGE_TRIP_LENGTH("AVE_TRIP_LENGTH", "INTEGER", true);
|
2011-05-23 18:59:34 +00:00
|
|
|
|
2012-01-02 23:08:43 +00:00
|
|
|
|
2011-05-23 18:59:34 +00:00
|
|
|
// This class cannot be instantiated
|
2012-01-02 23:08:43 +00:00
|
|
|
private RoutesColumns(String string, String type, Boolean nullable) {
|
2011-05-23 18:59:34 +00:00
|
|
|
this.string = string;
|
|
|
|
this.sqliteType = type;
|
2012-01-02 23:08:43 +00:00
|
|
|
this.nullable = nullable;
|
2011-05-23 18:59:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public final String string;
|
|
|
|
public final String sqliteType;
|
2012-01-02 23:08:43 +00:00
|
|
|
public final Boolean nullable;
|
2011-05-23 18:59:34 +00:00
|
|
|
|
|
|
|
protected String getColumnDef() {
|
2012-01-02 23:08:43 +00:00
|
|
|
return string + " " + sqliteType + (nullable?"":" NOT NULL");
|
2011-05-23 18:59:34 +00:00
|
|
|
}
|
|
|
|
}
|