Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.gawst.asyncdb.source.typed;
 
 
 import  android.support.annotation.NonNull;
 import  android.support.annotation.Nullable;

Interface to handle the transformation from a Key (K) / Value (V) pair to SQL query selections and from Cursor to Key (K) / Value (V) pairs.

Parameters:
<K> Type of the Key read/write from the org.gawst.asyncdb.source.DatabaseSource to/from the Map storage.
<V> Type of the Value read/write from the org.gawst.asyncdb.source.DatabaseSource to/from the Map storage.
Author(s):
Created by robUx4 on 06/01/2015.
See also:
org.gawst.asyncdb.source.DatabaseElementHandler
public interface TypedMapDatabaseElementHandler<K, V, CURSOR> {
The where clause that should be used to update/delete the item.

Parameters:
key the item about to be selected in the database
Returns:
a String for the whereClause in android.database.sqlite.SQLiteDatabase.update(String, android.content.ContentValues, String, String[]) or android.database.sqlite.SQLiteDatabase.delete(String, String, String[])
See also:
getKeySelectArgs(Object)
	@NonNull
	String getKeySelectClause(@Nullable K key);

The where arguments that should be used to update/delete the item.

Parameters:
key the item about to be selected in the database
Returns:
a String array for the whereArgs in android.database.sqlite.SQLiteDatabase.update(String, android.content.ContentValues, String, String[]) or android.database.sqlite.SQLiteDatabase.delete(String, String, String[])
See also:
getKeySelectClause(Object)
	@NonNull
	String[] getKeySelectArgs(@NonNull K key);

Use the data in the android.database.Cursor to create a valid item

Parameters:
cursor the Cursor to use
	@NonNull
cursorToKey(@NonNull CURSOR cursorthrows InvalidDbEntry;

Use the data in the android.database.Cursor to create a valid item

Parameters:
cursor the Cursor to use
	@NonNull
cursorToValue(@NonNull CURSOR cursor);
New to GrepCode? Check out our FAQ X