Search in sources :

Example 1 with SettingDao

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);
}
Also used : SettingDao(org.liberty.android.fantastischmemo.dao.SettingDao)

Example 2 with SettingDao

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);
    }
}
Also used : AnyMemoDBOpenHelper(org.liberty.android.fantastischmemo.common.AnyMemoDBOpenHelper) SettingDao(org.liberty.android.fantastischmemo.dao.SettingDao)

Aggregations

SettingDao (org.liberty.android.fantastischmemo.dao.SettingDao)2 AnyMemoDBOpenHelper (org.liberty.android.fantastischmemo.common.AnyMemoDBOpenHelper)1