public class AccountPublicDbSQLHelper extends KDFIterationsAwareSQLOpenHelper
| Modifier and Type | Field and Description |
|---|---|
protected static String |
ACCOUNTS_TABLE |
protected net.sqlcipher.database.SQLiteDatabase |
db |
protected static String |
FIELD_KEY_COLUMN |
protected static String |
FIELD_VALUE_COLUMN |
protected static String |
IDENTIFIER_ID_COLUMN |
protected static String |
IDENTIFIER_NAME_COLUMN |
protected static String |
PUBLIC_FIELDS_TABLE |
| Constructor and Description |
|---|
AccountPublicDbSQLHelper(Context context,
SQLiteInitializer sqLiteInitializer) |
| Modifier and Type | Method and Description |
|---|---|
int |
addAccount(String identifier)
Assumes account does not exist.
|
String |
addField(int identifierId,
String key,
String value) |
Integer |
getAccountId(String identifier) |
Map<String,Map<String,String>> |
getAccounts() |
net.sqlcipher.database.SQLiteDatabase |
getDb() |
void |
onCreate(net.sqlcipher.database.SQLiteDatabase db) |
void |
onUpgrade(net.sqlcipher.database.SQLiteDatabase db,
int oldVersion,
int newVersion) |
boolean |
removeAccount(int identifierId) |
boolean |
removeField(int identifierId,
String key) |
createKDFIterationHookprotected static final String ACCOUNTS_TABLE
protected static final String PUBLIC_FIELDS_TABLE
protected static final String IDENTIFIER_ID_COLUMN
protected static final String IDENTIFIER_NAME_COLUMN
protected static final String FIELD_KEY_COLUMN
protected static final String FIELD_VALUE_COLUMN
protected net.sqlcipher.database.SQLiteDatabase db
@Inject public AccountPublicDbSQLHelper(Context context, SQLiteInitializer sqLiteInitializer)
public void onCreate(net.sqlcipher.database.SQLiteDatabase db)
onCreate in class net.sqlcipher.database.SQLiteOpenHelperpublic void onUpgrade(net.sqlcipher.database.SQLiteDatabase db,
int oldVersion,
int newVersion)
onUpgrade in class net.sqlcipher.database.SQLiteOpenHelperpublic Integer getAccountId(String identifier) throws net.sqlcipher.SQLException
identifier - net.sqlcipher.SQLExceptionpublic int addAccount(String identifier) throws net.sqlcipher.database.SQLiteException
identifier - net.sqlcipher.database.SQLiteException - if the database cannot be opened for writingpublic boolean removeAccount(int identifierId)
throws net.sqlcipher.SQLException
net.sqlcipher.SQLExceptionpublic Map<String,Map<String,String>> getAccounts() throws net.sqlcipher.database.SQLiteException
net.sqlcipher.database.SQLiteExceptionpublic String addField(int identifierId, String key, String value) throws net.sqlcipher.SQLException
net.sqlcipher.SQLExceptionpublic boolean removeField(int identifierId,
String key)
throws net.sqlcipher.SQLException
key - net.sqlcipher.SQLExceptionpublic net.sqlcipher.database.SQLiteDatabase getDb()