package com.uwetrottmann.shopr.provider;

import android.content.ContentProvider;
import android.content.ContentValues;
import android.database.Cursor;
import android.net.Uri;

public class ShoprProvider extends ContentProvider {

	@Override
	public boolean onCreate() {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public String getType(Uri uri) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Cursor query(Uri uri, String[] projection, String selection,
			String[] selectionArgs, String sortOrder) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Uri insert(Uri uri, ContentValues values) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int update(Uri uri, ContentValues values, String selection,
			String[] selectionArgs) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int delete(Uri uri, String selection, String[] selectionArgs) {
		// TODO Auto-generated method stub
		return 0;
	}

}

@@ -113,16 +113,83 @@
 Values;%0A
+import android.content.Context;%0Aimport android.content.UriMatcher;%0A
 import a
@@ -296,97 +296,996 @@
 %7B%0A%0A%09
-@Override%0A%09public boolean onCreate() %7B%0A%09%09// TODO Auto-generated method stub%0A%09%09return fals
+private static UriMatcher sUriMatcher;%0A%0A%09private static final int ITEMS = 100;%0A%09private static final int ITEM_ID = 101;%0A%0A%09private static final int SHOPS = 200;%0A%09private static final int SHOP_ID = 201;%0A%0A%09/**%0A%09 * Build and return a %7B@link UriMatcher%7D that catches all %7B@link Uri%7D%0A%09 * variations supported by this %7B@link ContentProvider%7D.%0A%09 */%0A%09private static UriMatcher buildUriMatcher(Context context) %7B%0A%09%09final UriMatcher matcher = new UriMatcher(UriMatcher.NO_MATCH);%0A%09%09final String authority = ShoprContract.CONTENT_AUTHORITY;%0A%0A%09%09// Items%0A%09%09matcher.addURI(authority, ShoprContract.PATH_ITEMS, ITEMS);%0A%09%09matcher.addURI(authority, ShoprContract.PATH_ITEMS + %22/*%22, ITEM_ID);%0A%0A%09%09// Shops%0A%09%09matcher.addURI(authority, ShoprContract.PATH_SHOPS, SHOPS);%0A%09%09matcher.addURI(authority, ShoprContract.PATH_SHOPS + %22/*%22, SHOP_ID);%0A%0A%09%09return matcher;%0A%09%7D%0A%0A%09@Override%0A%09public boolean onCreate() %7B%0A%09%09final Context context = getContext();%0A        sUriMatcher = buildUriMatcher(context);%0A        return tru
 e;%0A%09

Add first URI matcher.