Android Open Source - chat.android Page Assessment1






From Project

Back to project page chat.android.

License

The source code is released under:

GNU General Public License

If you think the Android project chat.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 org.chat.android.models;
//from   w ww  . ja  v  a 2s  . co  m
import java.util.Date;

import android.util.Log;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

/**
 * Created by colin
 */
@DatabaseTable(tableName = "page_assessment1")
public class PageAssessment1 {
  @DatabaseField(id = true, unique = true, index = true)
  private int id;
  @DatabaseField
  private String type;
    @DatabaseField
    private String en_content1;
    @DatabaseField
    private String zu_content1;
    @DatabaseField
    private String en_content2;
    @DatabaseField
    private String zu_content2;
    @DatabaseField
    private String en_content3;
    @DatabaseField
    private String zu_content3;
    @DatabaseField
  private Date created_at;
  @DatabaseField
  private Date modified_at;

    
    /**
     * Default Constructor needed by ormlite
     */
    public PageAssessment1() {
    }

    
    /**
     * Constructor that instantiates the private member variable(s)
     * @param id
     * @param type
     * @param en_content1
     * @param zu_content1
     * @param en_content2
     * @param zu_content2
     * @param en_content3
     * @param zu_content3
     * @param created_at
     * @param modified_at
     * 
     */
    public PageAssessment1(int id, String type, String en_content1, String zu_content1, String en_content2, String zu_content2, String en_content3, String zu_content3, Date created_at, Date modified_at) {
      this.id = id;
      this.type = type;
        this.en_content1 = en_content1;
        this.zu_content1 = zu_content1;
        this.en_content2 = en_content2;
        this.zu_content2 = zu_content2;
        this.en_content3 = en_content3;
        this.zu_content3 = zu_content3;
        this.created_at = created_at;
      this.modified_at = modified_at;
    }
    
    
    /**
     * Copy constructor
     * @param existingListModel - List model instance that is copied to new instance
     */
//    public PageAssessment1(PageAssessment1 existingPageAssessment1Model) {
//      this.type = existingPageAssessment1Model.type;
//        this.en_content1 = existingPageAssessment1Model.en_content1;
//        this.zu_content1 = existingPageAssessment1Model.zu_content1;
//        this.en_content2 = existingPageAssessment1Model.en_content2;
//        this.zu_content2 = existingPageAssessment1Model.zu_content2;
//        this.en_content3 = existingPageAssessment1Model.en_content3;
//        this.zu_content3 = existingPageAssessment1Model.zu_content3;
//    }
    

  public int getId() {
    return id;
  }
  
  public String getType() {
    return type;
  }
  
  public void setType(String type) {
    this.type = type;
  }
  
  public String getEnContent1() {
    return en_content1;
  }
  
  public void setEnContent1(String en_content1) {
    this.en_content1 = en_content1;
  }
  
  public void setZuContent1(String zu_content1) {
    this.zu_content1 = zu_content1;
  }
  
  public String getZuContent1() {
    return zu_content1;
  }

  public String getEnContent2() {
    return en_content2;
  }
  
  public void setEnContent2(String en_content2) {
    this.en_content2 = en_content2;
  }
  
  public void setZuContent2(String zu_content2) {
    this.zu_content2 = zu_content2;
  }

  public String getZuContent2() {
    return zu_content2;
  }
  
  public String getEnContent3() {
    return en_content3;
  }
  
  public void setEnContent3(String en_content3) {
    this.en_content3 = en_content3;
  }
  
  public void setZuContent3(String zu_content3) {
    this.zu_content3 = zu_content3;
  }

  public String getZuContent3() {
    return zu_content3;
  }
  
  // and this, ladies and gentlemen, is an argument for JS > Java - this is one easy line in JS
  // TODO: figure out how to do this in a more elegant way, with casting
  public String getContent(String lang, String field) {
    if (lang.equals("en")) {
      if (field.equals("content1")) {
        return en_content1;
      } else if (field.equals("content2")) {
        return en_content2;
      } else if (field.equals("content3")) {
        return en_content3;
      } else {
        Log.e("Unknown field: ", field);
        return null;
      }
    } else if (lang.equals("zu")) {
      if (field.equals("content1")) {
        return zu_content1;
      } else if (field.equals("content2")) {
        return zu_content2;
      } else if (field.equals("content3")) {
        return zu_content3;
      } else {
        Log.e("Unknown field: ", field);
        return null;
      }
    } else {
      Log.e("Unknown language: ", lang);
      return null;
    }
  }
}




Java Source Code List

org.chat.android.BaseActivity.java
org.chat.android.CHADelivery.java
org.chat.android.CHAOverviewActivity.java
org.chat.android.CHASelectChildActivity.java
org.chat.android.CHASelectChildAdapter.java
org.chat.android.ChatUtil.java
org.chat.android.ClientsAdapter.java
org.chat.android.DatabaseHelper.java
org.chat.android.GPSTracker.java
org.chat.android.HealthDeliveryActivity.java
org.chat.android.HealthDetailsActivity.java
org.chat.android.HealthOverviewActivity.java
org.chat.android.HealthOverviewRecordActivity.java
org.chat.android.HomeActivity.java
org.chat.android.ImmunizationsReceivedActivity.java
org.chat.android.ImmunizationsSummaryActivity.java
org.chat.android.LoginActivity.java
org.chat.android.Mail.java
org.chat.android.ModelHelper.java
org.chat.android.MyApplication.java
org.chat.android.ResourcesActivity.java
org.chat.android.RestoreVisitActivity.java
org.chat.android.ServiceDeliveryActivity.java
org.chat.android.ServiceDeliveryAdapter.java
org.chat.android.ServiceDetailsActivity.java
org.chat.android.ServiceOtherActivity.java
org.chat.android.ServiceOverviewActivity.java
org.chat.android.ServicesAdapter.java
org.chat.android.SetupDB.java
org.chat.android.SetupVisitActivity.java
org.chat.android.SyncResourcesActivity.java
org.chat.android.Auth.AccountGeneral.java
org.chat.android.Auth.AuthenticatorService.java
org.chat.android.Auth.Authenticator.java
org.chat.android.Auth.ChatAuthServerAuthenticate.java
org.chat.android.Auth.MainActivity.java
org.chat.android.Auth.ServerAuthenticate.java
org.chat.android.Sync.StubProvider.java
org.chat.android.Sync.SyncAdapter.java
org.chat.android.Sync.SyncService.java
org.chat.android.Sync.provider.ChatContentProvider.java
org.chat.android.models.Attendance.java
org.chat.android.models.CHAAccessed.java
org.chat.android.models.Client.java
org.chat.android.models.HealthPage.java
org.chat.android.models.HealthSelectRecorded.java
org.chat.android.models.HealthSelect.java
org.chat.android.models.HealthTheme.java
org.chat.android.models.HealthTopicAccessed.java
org.chat.android.models.HealthTopic.java
org.chat.android.models.Household.java
org.chat.android.models.PageAssessment1.java
org.chat.android.models.PageSelect1.java
org.chat.android.models.PageText1.java
org.chat.android.models.PageVideo1.java
org.chat.android.models.ResourceAccessed.java
org.chat.android.models.Resource.java
org.chat.android.models.Role.java
org.chat.android.models.ServiceAccessed.java
org.chat.android.models.Service.java
org.chat.android.models.TopicVideo.java
org.chat.android.models.Util.java
org.chat.android.models.VaccineRecorded.java
org.chat.android.models.Vaccine.java
org.chat.android.models.VideoAccessed.java
org.chat.android.models.Video.java
org.chat.android.models.Visit.java
org.chat.android.models.Worker.java
org.chat.android.pages.Assessment1Fragment.java
org.chat.android.pages.BaseFragment.java
org.chat.android.pages.ReferralFragment.java
org.chat.android.pages.Select1Fragment.java
org.chat.android.pages.Text1Fragment.java
org.chat.android.pages.Video1Fragment.java