Skip to content

Instantly share code, notes, and snippets.

@ppamorim
Created August 20, 2015 00:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ppamorim/88f2553a6ff990876bc6 to your computer and use it in GitHub Desktop.
Save ppamorim/88f2553a6ff990876bc6 to your computer and use it in GitHub Desktop.
package com.doge.domain.model.realm;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.realm.RealmObject;
import io.realm.StateRealmRealmProxy;
import io.realm.UserRealmRealmProxy;
import io.realm.annotations.Ignore;
import io.realm.annotations.PrimaryKey;
import org.parceler.Parcel;
import org.parceler.ParcelConstructor;
@Parcel(
implementations = { UserRealmRealmProxy.class },
value = Parcel.Serialization.BEAN,
analyze = UserRealm.class)
public class UserRealm extends RealmObject {
@Ignore public static final String TAG = "userRealm";
@Ignore public static final String ID = "mid";
@Ignore public static final String PROFILE_ID = "profile_id";
@Ignore public static final String STATE_ID = "state_id";
@Ignore public static final String CITY_ID = "city_id";
@Ignore public static final String NAME = "name";
@Ignore public static final String EMAIL = "email";
@Ignore public static final String PHONE = "phone";
@Ignore public static final String IMAGE = "image";
@Ignore public static final String PASSWORD = "password";
@Ignore public static final String HASH = "hash";
@Ignore public static final String TOKEN = "token";
@Ignore public static final String FACEBOOK_ID = "facebook_id";
@Ignore public static final String FROM_FACEBOOK = "from_facebook";
@Ignore public static final String LOGGED = "logged";
@Ignore public static final String STREAM_NAME = "stream_name";
public UserRealm() { }
@ParcelConstructor
public UserRealm(int remoteId, int profileId, int state, int city, String name, String email,
String phone, String image, String password, String hash, String token, String facebookId,
boolean fromFacebook, boolean logged, String streamName) {
this.remoteId = remoteId;
this.profileId = profileId;
this.state = state;
this.city = city;
this.name = name;
this.email = email;
this.phone = phone;
this.image = image;
this.password = password;
this.hash = hash;
this.token = token;
this.facebookId = facebookId;
this.fromFacebook = fromFacebook;
this.logged = logged;
this.streamName = streamName;
}
@PrimaryKey private int remoteId;
@JsonProperty("id") private int profileId = 0;
@JsonProperty("estado_id") private int state;
@JsonProperty("cidade_id") private int city;
@JsonProperty("name") private String name = "";
@JsonProperty("email") private String email = "";
@JsonProperty("telefone") private String phone = "";
@JsonProperty("image") private String image = "";
@JsonProperty("senha") private String password = "";
@JsonProperty("hash") private String hash = "";
private String token = "";
@JsonProperty("facebook_id_android") private String facebookId;
private boolean fromFacebook;
private boolean logged;
private String streamName;
public int getRemoteId() {
return remoteId;
}
public void setRemoteId(int remoteId) {
this.remoteId = remoteId;
}
public int getProfileId() {
return profileId;
}
public void setProfileId(int profileId) {
this.profileId = profileId;
}
public int getState() {
return state;
}
public void setState(int state) {
this.state = state;
}
public int getCity() {
return city;
}
public void setCity(int city) {
this.city = city;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getImage() {
return image;
}
public void setImage(String image) {
this.image = image;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getHash() {
return hash;
}
public void setHash(String hash) {
this.hash = hash;
}
public String getToken() {
return token;
}
public void setToken(String token) {
this.token = token;
}
public String getFacebookId() {
return facebookId;
}
public void setFacebookId(String facebookId) {
this.facebookId = facebookId;
}
public boolean isFromFacebook() {
return fromFacebook;
}
public void setFromFacebook(boolean fromFacebook) {
this.fromFacebook = fromFacebook;
}
public boolean isLogged() {
return logged;
}
public void setLogged(boolean logged) {
this.logged = logged;
}
public String getStreamName() {
return streamName;
}
public void setStreamName(String streamName) {
this.streamName = streamName;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment