Subversion Repositories SmartDukaan

Rev

Rev 3024 | Go to most recent revision | 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;
3024 mandeep.dh 18
 
4793 amar.kumar 19
 
20
	/**
3024 mandeep.dh 21
     * Converts our domain model object from its thrift object representation.
22
     * @param tAgent
23
     * @return
24
     */
25
    public static Agent create(in.shop2020.crm.Agent tAgent)
26
    {
27
        Agent agent = new Agent();
28
        agent.id = tAgent.getId();
29
        agent.name = tAgent.getName();
30
        agent.emailId = tAgent.getEmailId();
31
        agent.managerId = tAgent.getManagerId();
32
        agent.password = tAgent.getPassword();
4793 amar.kumar 33
        agent.is_active = tAgent.isIs_active();
3024 mandeep.dh 34
        return agent;
35
    }
36
 
37
    /**
38
     * Converts this model object to corresponding thrift object representation.
39
     *
40
     * @return
41
     */
42
    public in.shop2020.crm.Agent getThriftAgent() {
43
        in.shop2020.crm.Agent tAgent = new in.shop2020.crm.Agent();
44
        tAgent.setEmailId(emailId);
45
        tAgent.setId(id);
46
        tAgent.setName(name);
47
        tAgent.setManagerId(managerId);
48
        tAgent.setPassword(password);
4793 amar.kumar 49
        tAgent.setIs_active(is_active);
3024 mandeep.dh 50
        return tAgent;
51
    }
52
 
53
    public long getId() {
54
        return id;
55
    }
56
 
57
    public void setId(long id) {
58
        this.id = id;
59
    }
60
 
61
    public String getEmailId() {
62
        return emailId;
63
    }
64
 
65
    public void setEmailId(String emailId) {
66
        this.emailId = emailId;
67
    }
68
 
69
    public String getPassword() {
70
        return password;
71
    }
72
 
73
    public void setPassword(String password) {
74
        this.password = password;
75
    }
76
 
77
    public String getName() {
78
        return name;
79
    }
80
 
81
    public void setName(String name) {
82
        this.name = name;
83
    }
84
 
85
    public long getManagerId() {
86
        return managerId;
87
    }
88
 
89
    public void setManagerId(long managerId) {
90
        this.managerId = managerId;
91
    }
4793 amar.kumar 92
 
93
    public boolean isIs_active() {
94
		return is_active;
95
	}
96
 
97
	public void setIs_active(boolean is_active) {
98
		this.is_active = is_active;
99
	}
3024 mandeep.dh 100
}