Home | History | Annotate | Download | only in provider

Lines Matching defs:uri

26 import android.net.Uri;
38 // The constants below represent individual URI routes, as IDs. Every URI pattern recognized by
42 // When a incoming URI is run through sUriMatcher, it will be tested against the defined
43 // URI patterns, and the corresponding route ID will be returned.
45 * URI ID for route: /entries
50 * URI ID for route: /entries/{ID}
70 * Determine the mime type for entries returned by a given URI.
73 public String getType(Uri uri) {
74 final int match = sUriMatcher.match(uri);
81 throw new UnsupportedOperationException("Unknown uri: " + uri);
86 * Perform a database query by URI.
92 public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs,
96 int uriMatch = sUriMatcher.match(uri);
100 String id = uri.getLastPathSegment();
107 // Note: Notification URI must be manually set here for loaders to correctly
111 c.setNotificationUri(ctx.getContentResolver(), uri);
114 throw new UnsupportedOperationException("Unknown uri: " + uri);
122 public Uri insert(Uri uri, ContentValues values) {
125 final int match = sUriMatcher.match(uri);
126 Uri result;
130 result = Uri.parse(FeedContract.Entry.CONTENT_URI + "/" + id);
133 throw new UnsupportedOperationException("Insert not supported on URI: " + uri);
135 throw new UnsupportedOperationException("Unknown uri: " + uri);
140 ctx.getContentResolver().notifyChange(uri, null, false);
145 * Delete an entry by database by URI.
148 public int delete(Uri uri, String selection, String[] selectionArgs) {
151 final int match = sUriMatcher.match(uri);
160 String id = uri.getLastPathSegment();
167 throw new UnsupportedOperationException("Unknown uri: " + uri);
172 ctx.getContentResolver().notifyChange(uri, null, false);
177 * Update an etry in the database by URI.
180 public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
183 final int match = sUriMatcher.match(uri);
192 String id = uri.getLastPathSegment();
199 throw new UnsupportedOperationException("Unknown uri: " + uri);
203 ctx.getContentResolver().notifyChange(uri, null, false);