Exemplo n.º 1
0
 @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);
   }
 }
Exemplo n.º 2
0
  @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();
    }
  }