@Override public void queryNewsByDate(String date) { newses = newsDao.queryBuilder().where(NewsDao.Properties.Date.eq(date)).list(); if (newses.size() == 0 || newses == null) { listener.onNoSearchResult(); } else { listener.onQueryNews(newses); } }
@Override public void deleteNewsByDate(String date) { newses = newsDao.queryBuilder().where(NewsDao.Properties.Date.eq(date)).list(); if (newses.size() == 0 || newses == null) { listener.onNoSearchResult(); } else { for (News news : newses) { newsDao.deleteByKey(news.getId()); Log.i("test", "delete key " + news.getId()); } listener.onDeleteNews(); } }