use of org.liberty.android.fantastischmemo.dao.SettingDao in project AnyMemo by helloworld1.
the class SettingTest method setSetting.
// Return the saved setting.
private Setting setSetting(Setting setting) throws SQLException {
SettingDao settingDao = helper.getSettingDao();
settingDao.update(setting);
return settingDao.queryForId(1);
}
use of org.liberty.android.fantastischmemo.dao.SettingDao in project AnyMemo by helloworld1.
the class DatabaseUtil method readDefaultSetting.
public Setting readDefaultSetting() {
String emptyDbPath = mContext.getApplicationContext().getFilesDir().getAbsolutePath() + "/" + AMEnv.EMPTY_DB_NAME;
AnyMemoDBOpenHelper helper = AnyMemoDBOpenHelperManager.getHelper(mContext, emptyDbPath);
try {
SettingDao settingDao = helper.getSettingDao();
return settingDao.queryForId(1);
} finally {
AnyMemoDBOpenHelperManager.releaseHelper(helper);
}
}
Aggregations