|
AeroGear Android Library 1.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.database.sqlite.SQLiteOpenHelper
org.jboss.aerogear.android.impl.datamanager.SQLStore<T>
public class SQLStore<T>
| Constructor Summary | |
|---|---|
SQLStore(Class<T> klass,
android.content.Context context)
|
|
SQLStore(Class<T> klass,
android.content.Context context,
com.google.gson.GsonBuilder builder,
IdGenerator generator)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class android.database.sqlite.SQLiteOpenHelper |
|---|
getDatabaseName, getReadableDatabase, getWritableDatabase, onDowngrade, onOpen |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SQLStore(Class<T> klass,
android.content.Context context)
public SQLStore(Class<T> klass,
android.content.Context context,
com.google.gson.GsonBuilder builder,
IdGenerator generator)
| Method Detail |
|---|
public StoreType getType()
getType in interface Store<T>public Collection<T> readAll()
readAll in interface Store<T>public T read(Serializable id)
read in interface Store<T>id - id from the desired object
public List<T> readWithFilter(ReadFilter filter)
readWithFilter in interface Store<T>filter - a filter to use to fetch an object
public void save(T item)
save in interface Store<T>item - Object to savepublic void reset()
reset in interface Store<T>public void remove(Serializable id)
remove in interface Store<T>id - Id of item to remotepublic void onCreate(android.database.sqlite.SQLiteDatabase db)
onCreate in class android.database.sqlite.SQLiteOpenHelper
public 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.SQLiteOpenHelper
|
AeroGear Android Library 1.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||