Guest User

Untitled

a guest
Oct 17th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 3.24 KB | None | 0 0
  1. import java.io.Serializable;
  2.  
  3. import com.j256.ormlite.field.DatabaseField;
  4.  
  5. public class RSSItem implements Serializable {
  6.     /**
  7.      *
  8.      */
  9.     private static final long serialVersionUID = -8946651854499212715L;
  10.  
  11.     @DatabaseField (canBeNull = false)
  12.     private String title;
  13.    
  14.     @DatabaseField (canBeNull = false)
  15.     private String author;
  16.    
  17.     @DatabaseField (canBeNull = false)
  18.     private String description;
  19.    
  20.     @DatabaseField (canBeNull = false)
  21.     private String category = null;
  22.    
  23.     @DatabaseField (canBeNull = false)
  24.     private String link = null;
  25.    
  26.     @DatabaseField (canBeNull = false)
  27.     private String pubDate = null;
  28.    
  29.     @DatabaseField (unique = true, index = true , generatedId = true)
  30.     private int appID;
  31.    
  32.     private String pathImg;
  33.  
  34.     public RSSItem() {}
  35.    
  36. //  public RSSItem(int appID, String appName, String appAuthor, String appDescription,
  37. //                                                  ArrayList<String> cat, String link, String pubdate) {
  38. //      this.title = appName;
  39. //      this.author = appAuthor;
  40. //      this.description = appDescription;
  41. //      this.category = cat;
  42. //      this.link = link;
  43. //      this.pubDate = pubdate;
  44. //      this.appID = appID;
  45. //  }
  46.    
  47.     public RSSItem(int appID, String appName, String appAuthor, String appDescription,
  48.                                                 String cat, String link, String pubdate, String pathImg) {
  49.         this.title = appName;
  50.         this.author = appAuthor;
  51.         this.description = appDescription;
  52.         this.category = cat;
  53.         this.link = link;
  54.         this.pubDate = pubdate;
  55.         this.pathImg = pathImg;
  56.         this.appID = appID;
  57.     }
  58.  
  59.    
  60.     public String getAuthor() {
  61.         return author;
  62.     }
  63.  
  64.     public void setAuthor(String appAuthor) {
  65.         this.author = appAuthor;
  66.     }
  67.  
  68.     /**
  69.      * @return the title
  70.      */
  71.     public String getTitle() {
  72.         return title;
  73.     }
  74.  
  75.     /**
  76.      * @param title the title to set
  77.      */
  78.     public void setTitle(String title) {
  79.         this.title = title;
  80.     }
  81.  
  82.     /**
  83.      * @return the description
  84.      */
  85.     public String getDescription() {
  86.         return description;
  87.     }
  88.  
  89.     /**
  90.      * @param description the description to set
  91.      */
  92.     public void setDescription(String description) {
  93.         this.description = description;
  94.     }
  95.  
  96.     /**
  97.      * @return the category
  98.      */
  99.     public String getCategory() {
  100.         return category.toLowerCase();
  101.     }
  102.  
  103.     /**
  104.      * @param category the category to set
  105.      */
  106.     public void setCategory(String value) {
  107.         this.category = value.toLowerCase();//.add(value.toLowerCase());
  108.     }
  109.  
  110.     /**
  111.      * @return the link
  112.      */
  113.     public String getLink() {
  114.         return link;
  115.     }
  116.  
  117.     /**
  118.      * @param link the link to set
  119.      */
  120.     public void setLink(String link) {
  121.         this.link = link;
  122.     }
  123.  
  124.     /**
  125.      * @return the pubDate
  126.      */
  127.     public String getPubDate() {
  128.         return pubDate;
  129.     }
  130.  
  131.     /**
  132.      * @param pubDate the pubDate to set
  133.      */
  134.     public void setPubDate(String pubDate) {
  135.         this.pubDate = pubDate;
  136.     }
  137.  
  138.     public int getAppID() {
  139.         return appID;
  140.     }
  141.  
  142.     public void setPathImg(String pathImg) {
  143.         this.pathImg = pathImg;
  144.     }
  145.    
  146.     public String getPathImg() {
  147.         return pathImg;
  148.     }
  149.  
  150.     public void setAppID(int appID) {
  151.         this.appID = appID;
  152.     }
  153.    
  154.     @Override
  155.     public String toString() {
  156.         return this.appID + ";; " +
  157.                 this.title + ";; " +
  158.                 this.author + ";; " +
  159.                 this.description + ";; " +
  160.                 this.category + ";; " +
  161.                 this.pathImg + ";; " +
  162.                 this.link + ";; " +
  163.                 this.pubDate;
  164.     }
  165.    
  166. }
Add Comment
Please, Sign In to add comment