Subversion Repositories SmartDukaan

Rev

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