BartRunnerAndroid/src/com/dougkeen/bart/data/RoutesColumns.java
dkeen@dkeen-laptop 58f623b1cf Estimated arrival display in progress
--HG--
branch : estarrival
2012-04-12 18:07:55 -07:00

28 lines
815 B
Java

package com.dougkeen.bart.data;
public enum RoutesColumns {
_ID("_id", "INTEGER", false),
FROM_STATION("FROM_STATION", "TEXT", false),
TO_STATION("TO_STATION", "TEXT", false),
FARE("FARE", "TEXT", true),
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);
// This class cannot be instantiated
private RoutesColumns(String string, String type, Boolean nullable) {
this.string = string;
this.sqliteType = type;
this.nullable = nullable;
}
public final String string;
public final String sqliteType;
public final Boolean nullable;
protected String getColumnDef() {
return string + " " + sqliteType + (nullable?"":" NOT NULL");
}
}