// Path: Android/Shopr/src/main/java/com/uwetrottmann/shopr/provider/ShoprContract.java
// public static class Items implements ItemsColumns, BaseColumns {
//     public static final Uri CONTENT_URI = BASE_CONTENT_URI.buildUpon()
//             .appendPath(PATH_ITEMS).build();
// 
//     /** Use if multiple items get returned */
//     public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.shopr.item";
// 
//     /** Use if a single item is returned */
//     public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.shopr.item";
// 
//     public static Uri buildItemUri(int itemId) {
//         return CONTENT_URI.buildUpon().appendPath(String.valueOf(itemId))
//                 .build();
//     }
// 
//     public static String getItemId(Uri uri) {
//         return uri.getLastPathSegment();
//     }
// }
// 
// Path: Android/Shopr/src/main/java/com/uwetrottmann/shopr/provider/ShoprContract.java
// public static class Shops implements ShopsColumns, BaseColumns {
//     public static final Uri CONTENT_URI = BASE_CONTENT_URI.buildUpon()
//             .appendPath(PATH_SHOPS).build();
// 
//     /** Use if multiple items get returned */
//     public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.shopr.shop";
// 
//     /** Use if a single item is returned */
//     public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.shopr.shop";
// 
//     public static Uri buildShopUri(int shopId) {
//         return CONTENT_URI.buildUpon().appendPath(String.valueOf(shopId))
//                 .build();
//     }
// 
//     public static String getShopId(Uri uri) {
//         return uri.getLastPathSegment();
//     }
// }
// 
// Path: Android/Shopr/src/main/java/com/uwetrottmann/shopr/provider/ShoprContract.java
// public static class Stats implements StatsColumns, BaseColumns {
//     public static final Uri CONTENT_URI = BASE_CONTENT_URI.buildUpon()
//             .appendPath(PATH_STATS).build();
// 
//     /** Use if multiple items get returned */
//     public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.shopr.stats";
// 
//     /** Use if a single item is returned */
//     public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.shopr.stats";
// 
//     public static Uri buildStatUri(int statId) {
//         return CONTENT_URI.buildUpon().appendPath(String.valueOf(statId))
//                 .build();
//     }
// 
//     public static String getStatId(Uri uri) {
//         return uri.getLastPathSegment();
//     }
// }


import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;
import com.uwetrottmann.shopr.provider.ShoprContract.Items;
import com.uwetrottmann.shopr.provider.ShoprContract.Shops;
import com.uwetrottmann.shopr.provider.ShoprContract.Stats;

package com.uwetrottmann.shopr.provider;



public class ShoprDatabase extends SQLiteOpenHelper {

    public static final String DATABASE_NAME = "shopr.db";

    public static final int DBVER_INITIAL = 1;

    public static final int DBVER_ITEM_COLUMNS = 2;

    public static final int DBVER_STATS = 3;

    public static final int DATABASE_VERSION = DBVER_STATS;

    public interface Tables {
        String ITEMS = "items";

        String SHOPS = "shops";

        String STATS = "stats";
    }

    public interface References {
        String SHOP_ID = "REFERENCES " + Tables.SHOPS + "(" + Shops._ID + ")";
    }

    private static final String CREATE_ITEMS_TABLE = "CREATE TABLE "
            + Tables.ITEMS + " ("

// Path: Android/Shopr/src/main/java/com/uwetrottmann/shopr/provider/ShoprContract.java
// public static class Items implements ItemsColumns, BaseColumns {
//     public static final Uri CONTENT_URI = BASE_CONTENT_URI.buildUpon()
//             .appendPath(PATH_ITEMS).build();
// 
//     /** Use if multiple items get returned */
//     public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.shopr.item";
// 
//     /** Use if a single item is returned */
//     public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.shopr.item";
// 
//     public static Uri buildItemUri(int itemId) {
//         return CONTENT_URI.buildUpon().appendPath(String.valueOf(itemId))
//                 .build();
//     }
// 
//     public static String getItemId(Uri uri) {
//         return uri.getLastPathSegment();
//     }
// }
// 
// Path: Android/Shopr/src/main/java/com/uwetrottmann/shopr/provider/ShoprContract.java
// public static class Shops implements ShopsColumns, BaseColumns {
//     public static final Uri CONTENT_URI = BASE_CONTENT_URI.buildUpon()
//             .appendPath(PATH_SHOPS).build();
// 
//     /** Use if multiple items get returned */
//     public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.shopr.shop";
// 
//     /** Use if a single item is returned */
//     public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.shopr.shop";
// 
//     public static Uri buildShopUri(int shopId) {
//         return CONTENT_URI.buildUpon().appendPath(String.valueOf(shopId))
//                 .build();
//     }
// 
//     public static String getShopId(Uri uri) {
//         return uri.getLastPathSegment();
//     }
// }
// 
// Path: Android/Shopr/src/main/java/com/uwetrottmann/shopr/provider/ShoprContract.java
// public static class Stats implements StatsColumns, BaseColumns {
//     public static final Uri CONTENT_URI = BASE_CONTENT_URI.buildUpon()
//             .appendPath(PATH_STATS).build();
// 
//     /** Use if multiple items get returned */
//     public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.shopr.stats";
// 
//     /** Use if a single item is returned */
//     public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.shopr.stats";
// 
//     public static Uri buildStatUri(int statId) {
//         return CONTENT_URI.buildUpon().appendPath(String.valueOf(statId))
//                 .build();
//     }
// 
//     public static String getStatId(Uri uri) {
//         return uri.getLastPathSegment();
//     }
// }


// Path: Android/Shopr/src/main/java/com/uwetrottmann/shopr/provider/ShoprDatabase.java
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;
import com.uwetrottmann.shopr.provider.ShoprContract.Items;
import com.uwetrottmann.shopr.provider.ShoprContract.Shops;
import com.uwetrottmann.shopr.provider.ShoprContract.Stats;


package com.uwetrottmann.shopr.provider;



public class ShoprDatabase extends SQLiteOpenHelper {

    public static final String DATABASE_NAME = "shopr.db";

    public static final int DBVER_INITIAL = 1;

    public static final int DBVER_ITEM_COLUMNS = 2;

    public static final int DBVER_STATS = 3;

    public static final int DATABASE_VERSION = DBVER_STATS;

    public interface Tables {
        String ITEMS = "items";

        String SHOPS = "shops";

        String STATS = "stats";
    }

    public interface References {
        String SHOP_ID = "REFERENCES " + Tables.SHOPS + "(" + Shops._ID + ")";
    }

    private static final String CREATE_ITEMS_TABLE = "CREATE TABLE "
            + Tables.ITEMS + " ("

            + Items._ID + " INTEGER PRIMARY KEY,"