Android Open Source - beansight-mobile-android Insight List Item






From Project

Back to project page beansight-mobile-android.

License

The source code is released under:

Apache License

If you think the Android project beansight-mobile-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.beansight.android.models;
//from w  w w.j  ava  2  s  .  c  o  m
import java.util.Date;


public class InsightListItem {
  
  private String id;
  private String content;
  // these dates should be Date objects, but it's hard to deserialize from long with Gson
  private long creationDate;
  private long endDate;
  private String endDateLabel;
  private String creator;  
  private int category;
  private int agreeCount;
  private int disagreeCount;
  private int commentCount;
  private String lastCurrentUserVote;
  
  public String getId() {
    return id;
  }
  public void setId(String uniqueId) {
    this.id = uniqueId;
  }
  public String getContent() {
    return content;
  }
  public void setContent(String content) {
    this.content = content;
  }
  public Date getCreationDate() {
    return new Date(creationDate);
  }
  public void setCreationDate(Date creationDate) {
    this.creationDate = creationDate.getTime();
  }
  public Date getEndDate() {
    return new Date(endDate);
  }
  public void setEndDate(Date endDate) {
    this.endDate = endDate.getTime();
  }
  public String getEndDateLabel() {
    return endDateLabel;
  }
  public void setEndDateLabel(String endDateLabel) {
    this.endDateLabel = endDateLabel;
  }
  public String getCreator() {
    return creator;
  }
  public void setCreator(String creator) {
    this.creator = creator;
  }
  public int getCategory() {
    return category;
  }
  public void setCategory(int category) {
    this.category = category;
  }
  public int getAgreeCount() {
    return agreeCount;
  }
  public void setAgreeCount(int agreeCount) {
    this.agreeCount = agreeCount;
  }
  public int getDisagreeCount() {
    return disagreeCount;
  }
  public void setDisagreeCount(int disagreeCount) {
    this.disagreeCount = disagreeCount;
  }
  public int getCommentCount() {
    return commentCount;
  }
  public void setCommentCount(int commentCount) {
    this.commentCount = commentCount;
  }
  public String getLastCurrentUserVote() {
    return lastCurrentUserVote;
  }
  public void setLastCurrentUserVote(String lastCurrentUserVote) {
    this.lastCurrentUserVote = lastCurrentUserVote;
  }
  
  /** Return the date + content */
  public String getInsightText() {
    return "" + getEndDateLabel() + ", " + getContent(); 
  }
  
}




Java Source Code List

com.beansight.android.BeansightApplication.java
com.beansight.android.HomeActivity.java
com.beansight.android.WebViewActivity.java
com.beansight.android.api.BeansightApi.java
com.beansight.android.api.NotAuthenticatedException.java
com.beansight.android.api.ServerErrorException.java
com.beansight.android.api.responses.InsightDetailResponse.java
com.beansight.android.api.responses.InsightListResponse.java
com.beansight.android.api.responses.InsightVoteResponse.java
com.beansight.android.api.responses.Meta.java
com.beansight.android.api.responses.Response.java
com.beansight.android.api.responses.UserProfileResponse.java
com.beansight.android.http.Http.java
com.beansight.android.models.InsightDetail.java
com.beansight.android.models.InsightListItem.java
com.beansight.android.models.InsightVote.java
com.beansight.android.models.UserProfile.java