Exemplo n.º 1
0
 private Feed assignUnusedId(Feed feed) {
   try {
     if (!InfoWallApplication.getInstance()
         .getDatabaseHelper()
         .getFeedReaderDAO()
         .idExists(feed.getFeedReaderID())) return feed;
     else feed.setFeedReaderID(feed.getFeedReaderID() + 1);
     feed = assignUnusedId(feed);
   } catch (SQLException e) {
     e.printStackTrace();
   }
   return feed;
 }
Exemplo n.º 2
0
  public DBFeed mapFeedToDBFeed(Feed feed) {
    DBFeed dbFeed = new DBFeed();

    if (dbFeed != null) {
      dbFeed.setImageURL(feed.getImageURL());
      dbFeed.setTitle(feed.getTitle());
      dbFeed.setDescription(feed.getDescription());
      dbFeed.setFeed(feed.getFeed());
      dbFeed.setFeedReaderID(feed.getFeedReaderID());
      dbFeed.setWebsite(feed.getWebsite());
      dbFeed.setSyncStatus(feed.isSyncStatus());
    }

    return dbFeed;
  }
Exemplo n.º 3
0
 @Override
 public boolean delete(Object object) {
   Feed feed = (Feed) object;
   deleteByID(feed.getFeedReaderID());
   return false;
 }