Back to project page demo-app-android.
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.
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; } }