Subversion Repositories SmartDukaan

Rev

Rev 4793 | Blame | Compare with Previous | Last modification | View Log | RSS feed

/**
 * 
 */
package in.shop2020.crm.domain;

/**
 * Domain class for Agents in CRM.
 *
 * @author mandeep
 */
public class Agent {
    private long    id;
    private String  emailId;
    private String  password;
    private String  name;
    private long    managerId;
    private boolean is_active;
    private boolean is_pmCrmUser;
    private boolean is_allAssignable;

        /**
     * Converts our domain model object from its thrift object representation.
     * @param tAgent
     * @return
     */
    public static Agent create(in.shop2020.crm.Agent tAgent)
    {
        Agent agent = new Agent();
        agent.id = tAgent.getId();
        agent.name = tAgent.getName();
        agent.emailId = tAgent.getEmailId();
        agent.managerId = tAgent.getManagerId();
        agent.password = tAgent.getPassword();
        agent.is_active = tAgent.isIs_active();
        agent.is_pmCrmUser = tAgent.isIs_pmCrmUser();
        agent.is_allAssignable = tAgent.isIs_allAssignable();
        return agent;
    }

    /**
     * Converts this model object to corresponding thrift object representation.
     *
     * @return
     */
    public in.shop2020.crm.Agent getThriftAgent() {
        in.shop2020.crm.Agent tAgent = new in.shop2020.crm.Agent();
        tAgent.setEmailId(emailId);
        tAgent.setId(id);
        tAgent.setName(name);
        tAgent.setManagerId(managerId);
        tAgent.setPassword(password);
        tAgent.setIs_active(is_active);
        tAgent.setIs_pmCrmUser(is_pmCrmUser);
        tAgent.setIs_allAssignable(is_allAssignable);
        return tAgent;
    }

    public long getId() {
        return id;
    }

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

    public String getEmailId() {
        return emailId;
    }

    public void setEmailId(String emailId) {
        this.emailId = emailId;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public long getManagerId() {
        return managerId;
    }

    public void setManagerId(long managerId) {
        this.managerId = managerId;
    }
    
    public boolean isIs_active() {
                return is_active;
        }

        public void setIs_active(boolean is_active) {
                this.is_active = is_active;
        }

        public boolean isIs_pmCrmUser() {
                return is_pmCrmUser;
        }

        public void setIs_pmCrmUser(boolean is_pmCrmUser) {
                this.is_pmCrmUser = is_pmCrmUser;
        }

        public boolean isIs_allAssignable() {
                return is_allAssignable;
        }

        public void setIs_allAssignable(boolean is_allAssignable) {
                this.is_allAssignable = is_allAssignable;
        }
}