Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
3024 mandeep.dh 1
/**
2
 * 
3
 */
4
package in.shop2020.crm.domain;
5
 
6
/**
7
 * Domain class for Agents in CRM.
8
 *
9
 * @author mandeep
10
 */
11
public class Agent {
4793 amar.kumar 12
    private long    id;
13
    private String  emailId;
14
    private String  password;
15
    private String  name;
16
    private long    managerId;
17
    private boolean is_active;
16244 manish.sha 18
    private boolean is_pmCrmUser;
19
    private boolean is_allAssignable;
3024 mandeep.dh 20
 
4793 amar.kumar 21
	/**
3024 mandeep.dh 22
     * Converts our domain model object from its thrift object representation.
23
     * @param tAgent
24
     * @return
25
     */
26
    public static Agent create(in.shop2020.crm.Agent tAgent)
27
    {
28
        Agent agent = new Agent();
29
        agent.id = tAgent.getId();
30
        agent.name = tAgent.getName();
31
        agent.emailId = tAgent.getEmailId();
32
        agent.managerId = tAgent.getManagerId();
33
        agent.password = tAgent.getPassword();
4793 amar.kumar 34
        agent.is_active = tAgent.isIs_active();
16244 manish.sha 35
        agent.is_pmCrmUser = tAgent.isIs_pmCrmUser();
36
        agent.is_allAssignable = tAgent.isIs_allAssignable();
3024 mandeep.dh 37
        return agent;
38
    }
39
 
40
    /**
41
     * Converts this model object to corresponding thrift object representation.
42
     *
43
     * @return
44
     */
45
    public in.shop2020.crm.Agent getThriftAgent() {
46
        in.shop2020.crm.Agent tAgent = new in.shop2020.crm.Agent();
47
        tAgent.setEmailId(emailId);
48
        tAgent.setId(id);
49
        tAgent.setName(name);
50
        tAgent.setManagerId(managerId);
51
        tAgent.setPassword(password);
4793 amar.kumar 52
        tAgent.setIs_active(is_active);
16244 manish.sha 53
        tAgent.setIs_pmCrmUser(is_pmCrmUser);
54
        tAgent.setIs_allAssignable(is_allAssignable);
3024 mandeep.dh 55
        return tAgent;
56
    }
57
 
58
    public long getId() {
59
        return id;
60
    }
61
 
62
    public void setId(long id) {
63
        this.id = id;
64
    }
65
 
66
    public String getEmailId() {
67
        return emailId;
68
    }
69
 
70
    public void setEmailId(String emailId) {
71
        this.emailId = emailId;
72
    }
73
 
74
    public String getPassword() {
75
        return password;
76
    }
77
 
78
    public void setPassword(String password) {
79
        this.password = password;
80
    }
81
 
82
    public String getName() {
83
        return name;
84
    }
85
 
86
    public void setName(String name) {
87
        this.name = name;
88
    }
89
 
90
    public long getManagerId() {
91
        return managerId;
92
    }
93
 
94
    public void setManagerId(long managerId) {
95
        this.managerId = managerId;
96
    }
4793 amar.kumar 97
 
98
    public boolean isIs_active() {
99
		return is_active;
100
	}
101
 
102
	public void setIs_active(boolean is_active) {
103
		this.is_active = is_active;
104
	}
16244 manish.sha 105
 
106
	public boolean isIs_pmCrmUser() {
107
		return is_pmCrmUser;
108
	}
109
 
110
	public void setIs_pmCrmUser(boolean is_pmCrmUser) {
111
		this.is_pmCrmUser = is_pmCrmUser;
112
	}
113
 
114
	public boolean isIs_allAssignable() {
115
		return is_allAssignable;
116
	}
117
 
118
	public void setIs_allAssignable(boolean is_allAssignable) {
119
		this.is_allAssignable = is_allAssignable;
120
	}
3024 mandeep.dh 121
}