Back to project page spiderreddit.
The source code is released under:
MIT License
If you think the Android project spiderreddit listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.davepayne.blogcrawler.db; //www . j a v a2 s .co m import com.j256.ormlite.field.DatabaseField; import java.util.ArrayList; import at.theengine.android.simple_rss2_android.RSSItem; public class RSSDBData { public RSSDBData(String link, String title, String description, String content, String date) { this.link = link; this.title = title; this.description = description; this.content = content; this.date = date; } public RSSDBData(RSSItem thisRSSItem) { this.link = thisRSSItem.getLink().toString(); this.title = thisRSSItem.getTitle(); this.description = thisRSSItem.getDescription(); this.content = thisRSSItem.getContent(); this.date = thisRSSItem.getDate(); } // id is generated by the database and set on the object automagically @DatabaseField(generatedId = true) int id; @DatabaseField(index = true) private String link; @DatabaseField private String title; @DatabaseField private String description; @DatabaseField private String content; @DatabaseField private String date; RSSDBData() { // needed by ormlite } @Override public String toString() { return "RSSDBData{" + "id=" + id + ", link='" + link + '\'' + ", title='" + title + '\'' + ", description='" + description + '\'' + ", content='" + content + '\'' + ", date='" + date + '\'' + '}'; } public RSSItem toRSSItem() { RSSItem newRSSItem = new RSSItem(); newRSSItem.setLink(getLink()); newRSSItem.setTitle(getTitle()); newRSSItem.setDescription(getDescription()); newRSSItem.setContent(getContent()); newRSSItem.setDate(getDate()); return newRSSItem; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getLink() { return link; } public void setLink(String link) { this.link = link; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public String getDate() { return date; } public void setDate(String date) { this.date = date; } }