| Constructor and Description |
|---|
SQLStore(Class<T> klass,
android.content.Context context) |
SQLStore(Class<T> klass,
android.content.Context context,
com.google.gson.GsonBuilder builder,
IdGenerator generator) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
StoreType |
getType()
Returns the type of the underlying 'store implementation'
|
void |
onCreate(android.database.sqlite.SQLiteDatabase db) |
void |
onUpgrade(android.database.sqlite.SQLiteDatabase db,
int oldVersion,
int newVersion) |
void |
open(Callback onReady) |
T |
read(Serializable id)
Reads a specific object/record from the underlying storage system.
|
Collection<T> |
readAll()
Reads all the data from the underlying storage system.
|
List<T> |
readWithFilter(ReadFilter filter)
Search for objects/records from the underlying storage system.
|
void |
remove(Serializable id)
Removes a specific object/record from the underlying storage system.
|
void |
reset()
Resets the entire storage system.
|
void |
save(T item)
Saves the given object in the underlying storage system.
|
public SQLStore(Class<T> klass, android.content.Context context, com.google.gson.GsonBuilder builder, IdGenerator generator)
public StoreType getType()
public Collection<T> readAll()
public T read(Serializable id)
public List<T> readWithFilter(ReadFilter filter)
readWithFilter in interface Store<T>filter - a filter to use to fetch an objectpublic void save(T item)
public void reset()
public void remove(Serializable id)
public void onCreate(android.database.sqlite.SQLiteDatabase db)
onCreate in class android.database.sqlite.SQLiteOpenHelperpublic void onUpgrade(android.database.sqlite.SQLiteDatabase db,
int oldVersion,
int newVersion)
onUpgrade in class android.database.sqlite.SQLiteOpenHelperpublic void open(Callback onReady)
public void close()
close in class android.database.sqlite.SQLiteOpenHelperCopyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.