| Constructor and Description |
|---|
EncryptedSQLStore(Class<T> modelClass,
android.content.Context context,
com.google.gson.GsonBuilder builder,
IdGenerator idGenerator,
String passphrase) |
| Modifier and Type | Method and Description |
|---|---|
StoreType |
getType()
Returns the type of the underlying 'store implementation'
|
boolean |
isEmpty()
Checks if the storage system contains no stored elements.
|
void |
onCreate(android.database.sqlite.SQLiteDatabase sqLiteDatabase) |
void |
onOpen(android.database.sqlite.SQLiteDatabase db) |
void |
onUpgrade(android.database.sqlite.SQLiteDatabase sqLiteDatabase,
int oldVersion,
int newVersion) |
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 EncryptedSQLStore(Class<T> modelClass, android.content.Context context, com.google.gson.GsonBuilder builder, IdGenerator idGenerator, String passphrase)
public void onCreate(android.database.sqlite.SQLiteDatabase sqLiteDatabase)
onCreate in class android.database.sqlite.SQLiteOpenHelperpublic void onUpgrade(android.database.sqlite.SQLiteDatabase sqLiteDatabase,
int oldVersion,
int newVersion)
onUpgrade in class android.database.sqlite.SQLiteOpenHelperpublic void onOpen(android.database.sqlite.SQLiteDatabase db)
onOpen in class android.database.sqlite.SQLiteOpenHelperpublic StoreType getType()
public Collection<T> readAll() throws InvalidKeyException
readAll in interface Store<T>InvalidKeyExceptionpublic T read(Serializable id) throws InvalidKeyException
read in interface Store<T>id - id from the desired objectInvalidKeyExceptionpublic List<T> readWithFilter(ReadFilter filter) throws InvalidKeyException
readWithFilter in interface Store<T>filter - a filter to use to fetch an objectInvalidKeyExceptionpublic void save(T item)
public void reset()
public void remove(Serializable id)
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.