Android Open Source - demo-app-android User






From Project

Back to project page demo-app-android.

License

The source code is released under:

MIT License

If you think the Android project demo-app-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 io.rong.imkit.demo.model;
/*from   w w w.  j a v a  2 s  .c o m*/
// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. Enable "keep" sections if you want to edit. 

import io.rong.imkit.demo.ParcelUtils;
import io.rong.imkit.model.Friend;

import java.io.Serializable;

import android.os.Parcel;
import android.os.Parcelable;

/**
 *
 * Entity mapped to table USER.
 */

public class User implements Parcelable, Serializable {

  private String userId;

  private String username;

  private String portrait;

  private String passwd;

  private String deviceId;

  private String token;

  private String cookie;
  private int id;
  private int code;

  public User() {

  }

  public User(Parcel in) {

    userId = ParcelUtils.readStringFromParcel(in);

    username = ParcelUtils.readStringFromParcel(in);

    portrait = ParcelUtils.readStringFromParcel(in);

    passwd = ParcelUtils.readStringFromParcel(in);

    deviceId = ParcelUtils.readStringFromParcel(in);

    token = ParcelUtils.readStringFromParcel(in);

    cookie = ParcelUtils.readStringFromParcel(in);

  }

  public static final Creator<User> CREATOR = new Creator<User>() {

    @Override
    public User createFromParcel(Parcel source) {

      return new User(source);

    }

    @Override
    public User[] newArray(int size) {

      return new User[size];

    }

  };

  @Override
  public int describeContents() {

    return 0;

  }

  @Override
  public void writeToParcel(Parcel dest, int flags) {

    ParcelUtils.writeToParcel(dest, userId);

    ParcelUtils.writeToParcel(dest, username);

    ParcelUtils.writeToParcel(dest, portrait);

    ParcelUtils.writeToParcel(dest, passwd);

    ParcelUtils.writeToParcel(dest, deviceId);

    ParcelUtils.writeToParcel(dest, token);

    ParcelUtils.writeToParcel(dest, cookie);

  }

  public String getUserId() {

    return userId;

  }

  public void setUserId(String userId) {

    this.userId = userId;

  }

  public String getUsername() {

    return username;

  }

  public void setUsername(String username) {

    this.username = username;

  }

  public String getPasswd() {

    return passwd;

  }

  public void setPasswd(String passwd) {

    this.passwd = passwd;

  }

  public String getDeviceId() {

    return deviceId;

  }

  public void setDeviceId(String deviceId) {

    this.deviceId = deviceId;

  }

  public String getToken() {

    return token;

  }

  public void setToken(String token) {

    this.token = token;

  }

  public String getPortrait() {

    return portrait;

  }

  public void setPortrait(String portrait) {

    this.portrait = portrait;

  }

  public String getCookie() {

    return cookie;

  }

  public void setCookie(String cookie) {

    this.cookie = cookie;

  }

  public Friend toFriend() {
    Friend friend = new Friend();
    friend.setNickname(username);
    friend.setUserId(String.valueOf(id));
    friend.setPortrait(portrait);
    return friend;
  }

  public int getId() {
    return id;
  }

  public void setId(int id) {
    this.id = id;
  }

  public int getCode() {
    return code;
  }

  public void setCode(int code) {
    this.code = code;
  }

}




Java Source Code List

io.rong.imkit.demo.BaseActivity.java
io.rong.imkit.demo.BaseApiActivity.java
io.rong.imkit.demo.BlackListActivity.java
io.rong.imkit.demo.BlackListAdapter.java
io.rong.imkit.demo.DefaultExceptionHandler.java
io.rong.imkit.demo.DemoActivity.java
io.rong.imkit.demo.DemoApplication.java
io.rong.imkit.demo.DemoContext.java
io.rong.imkit.demo.FunctionListAdapter.java
io.rong.imkit.demo.GroupListActivity.java
io.rong.imkit.demo.GroupListAdapter.java
io.rong.imkit.demo.LocationActivity.java
io.rong.imkit.demo.LoginActivity.java
io.rong.imkit.demo.MainActivity.java
io.rong.imkit.demo.ParcelUtils.java
io.rong.imkit.demo.RegisterActivity.java
io.rong.imkit.demo.TestFragment2Activity.java
io.rong.imkit.demo.TestFragmentActivity.java
io.rong.imkit.demo.UserInfoActivity.java
io.rong.imkit.demo.common.DemoApi.java
io.rong.imkit.demo.model.CustomerService.java
io.rong.imkit.demo.model.Status.java
io.rong.imkit.demo.model.User.java
io.rong.imkit.demo.parser.GsonArrayParser.java
io.rong.imkit.demo.parser.GsonParser.java
io.rong.imkit.demo.parser.JsonObjectParser.java
io.rong.imkit.demo.parser.RegisterParser.java
io.rong.imkit.demo.ui.BaseFrameLayout.java
io.rong.imkit.demo.ui.LoadingDialog.java
io.rong.imkit.demo.ui.WinToast.java