package org.zarroboogs.weibo.greendao.bean;

// THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS

// KEEP INCLUDES - put your custom includes here

import com.google.gson.Gson;

import org.zarroboogs.weibo.bean.UserBean;
// KEEP INCLUDES END

/**
 * Entity mapped to table "account_table".
 */
public class Green_AccountBean implements java.io.Serializable {

    private Long uid;
    private String user_name;
    private String user_password;
    private String cookie;
    private String oauth_token;
    private Long oauth_token_expires_time;
    private String access_token_hack;
    private Long expires_time_hack;
    private String g_sid;
    private Integer navigation_position;
    private String user_info_json;

    // KEEP FIELDS - put your custom fields here
    private UserBean mUserBean;
    // KEEP FIELDS END

    public Green_AccountBean() {
    }

    public Green_AccountBean(Long uid) {
        this.uid = uid;
    }

    public Green_AccountBean(Long uid, String user_name, String user_password, String cookie, String oauth_token, Long oauth_token_expires_time, String access_token_hack, Long expires_time_hack, String g_sid, Integer navigation_position, String user_info_json) {
        this.uid = uid;
        this.user_name = user_name;
        this.user_password = user_password;
        this.cookie = cookie;
        this.oauth_token = oauth_token;
        this.oauth_token_expires_time = oauth_token_expires_time;
        this.access_token_hack = access_token_hack;
        this.expires_time_hack = expires_time_hack;
        this.g_sid = g_sid;
        this.navigation_position = navigation_position;
        this.user_info_json = user_info_json;
    }

    public Long getUid() {
        return uid;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    public String getUser_name() {
        return user_name;
    }

    public void setUser_name(String user_name) {
        this.user_name = user_name;
    }

    public String getUser_password() {
        return user_password;
    }

    public void setUser_password(String user_password) {
        this.user_password = user_password;
    }

    public String getCookie() {
        return cookie;
    }

    public void setCookie(String cookie) {
        this.cookie = cookie;
    }

    public String getOauth_token() {
        return oauth_token;
    }

    public void setOauth_token(String oauth_token) {
        this.oauth_token = oauth_token;
    }

    public Long getOauth_token_expires_time() {
        return oauth_token_expires_time;
    }

    public void setOauth_token_expires_time(Long oauth_token_expires_time) {
        this.oauth_token_expires_time = oauth_token_expires_time;
    }

    public String getAccess_token_hack() {
        return access_token_hack;
    }

    public void setAccess_token_hack(String access_token_hack) {
        this.access_token_hack = access_token_hack;
    }

    public Long getExpires_time_hack() {
        return expires_time_hack;
    }

    public void setExpires_time_hack(Long expires_time_hack) {
        this.expires_time_hack = expires_time_hack;
    }

    public String getG_sid() {
        return g_sid;
    }

    public void setG_sid(String g_sid) {
        this.g_sid = g_sid;
    }

    public Integer getNavigation_position() {
        return navigation_position;
    }

    public void setNavigation_position(Integer navigation_position) {
        this.navigation_position = navigation_position;
    }

    public String getUser_info_json() {
        return user_info_json;
    }

    public void setUser_info_json(String user_info_json) {
        this.user_info_json = user_info_json;
    }

    // KEEP METHODS - put your custom methods here

    public UserBean getUserBean() {
        if (mUserBean == null) {
            mUserBean = new Gson().fromJson(getUser_info_json(), UserBean.class);
        }
        return mUserBean;
    }
    // KEEP METHODS END

}
