/** * ToDo情報のデータベース検索処理 * * @strSearchWord 検索ワード * @return 処理を行った場合はtrue */ private boolean searchTODO(String strSearchWord) { Log.d("DEBUG", "Search SetSearchResultListTask searchTODO Start"); boolean blResult = true; ToDoCursor tdcObj = null; lSLR = new ArrayList<SearchListRow>(); try { String[] where_args = {strSearchWord, strSearchWord}; // カーソルの取得 tdcObj = tdhDB.getToDoSearchResult(where_args); // カーソルポインター初期化 startManagingCursor(tdcObj); Log.d( "DEBUG", "Search SetSearchResultListTask searchTODO ScheduleCursor Count : " + tdcObj.getCount()); for (int intCt = 0; intCt < tdcObj.getCount(); intCt++) { // スケジュールのセット SearchListRow slrObj = new SearchListRow(); slrObj.setStrDate(DateUtil.convBaseYMD(tdcObj.getColDate())); slrObj.setStrSearchType(getString(R.string.tdsearchtarget)); lSLR.add(slrObj); tdcObj.moveToNext(); } tdcObj.close(); } catch (SQLException e) { blResult = false; Log.e("ERROR", "Search SetSearchResultListTask searchTODO DB Error", e); } finally { if (tdcObj != null) { tdcObj.close(); } } Log.d("DEBUG", "Search SetSearchResultListTask searchTODO End"); return blResult; }
/** * スケジュール情報のデータベース検索処理 * * @strSearchWord 検索ワード * @return 処理を行った場合はtrue */ private boolean searchSCHEDULE(String strSearchWord) { Log.d("DEBUG", "Search SetSearchResultListTask searchSCHEDULE Start"); boolean blResult = true; ScheduleCursor scObj = null; lSLR = new ArrayList<SearchListRow>(); try { String[] where_args = {strSearchWord, strSearchWord, strSearchWord}; // カーソルの取得 scObj = sdhDB.getScheduleSearchResult(where_args); // カーソルポインター初期化 startManagingCursor(scObj); Log.d( "DEBUG", "Search SetSearchResultListTask searchSCHEDULE ScheduleCursor Count : " + scObj.getCount()); for (int intCt = 0; intCt < scObj.getCount(); intCt++) { // スケジュールのセット SearchListRow slrObj = new SearchListRow(); slrObj.setStrDate(scObj.getColTargetDate()); slrObj.setStrSearchType(getString(R.string.scsearchtarget)); lSLR.add(slrObj); scObj.moveToNext(); } scObj.close(); } catch (SQLException e) { blResult = false; Log.e("ERROR", "Search SetSearchResultListTask searchSCHEDULE DB Error", e); } finally { if (scObj != null) { scObj.close(); } } Log.d("DEBUG", "Search SetSearchResultListTask searchSCHEDULE End"); return blResult; }