public void insertDeskMenuSettingInfo(DeskMenuSettingInfo info) { final DataProvider dataProvider = mDataProvider; ContentValues values = new ContentValues(); info.contentValues(values); dataProvider.insertDeskMenuSetting(values); values = null; }
public DeskMenuSettingInfo getDeskMenuSettingInfo() { final DataProvider dataProvider = mDataProvider; Cursor cursor = dataProvider.queryDeskMenuSetting(); if (null != cursor) { try { DeskMenuSettingInfo info = new DeskMenuSettingInfo(); boolean bOk = info.parseFromCursor(cursor); if (bOk) { return info; } } catch (SQLiteException e) { e.printStackTrace(); } finally { cursor.close(); } } return null; }