Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.gawst.asyncdb.source;
 
 import  android.annotation.TargetApi;
 import  android.content.Context;
 import  android.database.Cursor;
 import  android.database.sqlite.SQLiteOpenHelper;
 import  android.os.Build;
 import  android.support.annotation.NonNull;
 
A org.gawst.asyncdb.DataSource backed by a android.database.sqlite.SQLiteOpenHelper storage.

Author(s):
Created by robUx4 on 12/31/2014.
public class SqliteDataSource<E> extends TypedSqliteDataSource<E, Cursor> implements DatabaseSource<LongVoid> {
Constructor. (API v14 minimum)

Parameters:
context Context used to erase the database file in case it's corrupted.
db The SQL database used to read/write data.
tableName Name of the SQL table that contains the elements to read.
databaseElementHandler Handler to transform Cursor into E elements or E elements to selections.
	@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
	public SqliteDataSource(@NonNull Context context, @NonNull SQLiteOpenHelper db, @NonNull String tableName, @NonNull DatabaseElementHandler<E> databaseElementHandler) {
		super(contextdbtableNamedatabaseElementHandler);
	}

Constructor.

Parameters:
context Context used to erase the database file in case it's corrupted.
db The SQL database used to read/write data.
tableName Name of the SQL table that contains the elements to read.
databaseName Name of the database file on disk, in case it's corrupted and needs to be erased.
databaseElementHandler Handler to transform Cursor into E elements or E elements to selections.
	public SqliteDataSource(@NonNull Context context, @NonNull SQLiteOpenHelper db, @NonNull String tableName, @NonNull String databaseName, @NonNull DatabaseElementHandler<E> databaseElementHandler) {
		super(contextdbtableNamedatabaseNamedatabaseElementHandler);
	}
	public Cursor wrapCursor(Cursor cursor) {
		return cursor;
	}
New to GrepCode? Check out our FAQ X