Skip to content

Instantly share code, notes, and snippets.

@AntonioDiaz
Created December 28, 2016 18:46
Show Gist options
  • Save AntonioDiaz/a03ec313fb98549ece66e3e53cee7a8a to your computer and use it in GitHub Desktop.
Save AntonioDiaz/a03ec313fb98549ece66e3e53cee7a8a to your computer and use it in GitHub Desktop.
Defines table and column names for the weather database.
package com.example.android.sunshine.app.data;
import android.content.ContentResolver;
import android.content.ContentUris;
import android.net.Uri;
import android.provider.BaseColumns;
import android.text.format.Time;
/** Defines table and column names for the weather database. */
public class WeatherContract {
/* Inner class that defines the table contents of the location table. */
public static final class LocationEntry implements BaseColumns {
/* table name */
public static final String TABLE_NAME = "location";
/* location setting: */
public static final String COLUMN_LOCATION_SETTING = "location_setting";
/* location latitude: integer */
public static final String COLUMN_COORD_LAT = "coord_lat";
/* location longitude: integer */
public static final String COLUMN_COORD_LONG = "coord_long";
/* location city name: string */
public static final String COLUMN_CITY_NAME = "city_name";
}
public static final class WeatherEntry implements BaseColumns { }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment