/** Clean up data. */ public void cleanUpData() { Long aWeekAgo = System.currentTimeMillis() - 604800000; List<Chatter> chatterList = selectAllChatter(aWeekAgo); for (Chatter c : chatterList) { deleteSingleData(c.getId()); } }
/** * Update data. * * @param chatter the chatter */ public void updateChatter(Chatter chatter) { ContentValues vals = new ContentValues(); vals.put("chatterId", chatter.getChatterId()); vals.put("actor", chatter.getActor()); vals.put("post", chatter.getPost()); vals.put("commentCount", chatter.getCommentCount()); vals.put("likeCount", chatter.getLikeCount()); vals.put("createTime", System.currentTimeMillis()); this.db.update(TABLE_CHATTER, vals, "id=" + chatter.getId(), null); }