Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.gawst.asyncdb.source;
 
 import  android.content.ContentResolver;
 import  android.content.Context;
 import  android.database.Cursor;
 import  android.net.Uri;
 import  android.support.annotation.NonNull;
 
A org.gawst.asyncdb.DataSource reading/writing data using a ContentProvider

Parameters:
<E> Type of the elements read from the Cursor
public class ContentProviderDataSource<E> extends TypedContentProviderDataSource<E, Cursor> implements DatabaseSource<Uri, Uri> {
Contructor.

Parameters:
contentResolver ContentResolver used to access the ContentProvider
contentProviderUri Uri to access the data from the ContentProvider
databaseElementHandler Handler to transform E elements to queries and Cursor to E elements.
	public ContentProviderDataSource(@NonNull ContentResolver contentResolver, @NonNull Uri contentProviderUri, @NonNull DatabaseElementHandler<E> databaseElementHandler) {
		super(contentResolvercontentProviderUridatabaseElementHandler);
	}

Contructor.

Parameters:
context Context used to get the ContentResolver used to access the ContentProvider
contentProviderUri Uri to access the data from the ContentProvider
databaseElementHandler Handler to transform E elements to queries and Cursor to E elements.
	public ContentProviderDataSource(@NonNull Context context, @NonNull Uri contentProviderUri, @NonNull DatabaseElementHandler<E> databaseElementHandler) {
		super(contextcontentProviderUridatabaseElementHandler);
	}
	public Cursor wrapCursor(Cursor cursor) {
		return cursor;
	}
New to GrepCode? Check out our FAQ X