Subversion Repositories SmartDukaan

Rev

Rev 3269 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3269 Rev 3390
Line 18... Line 18...
18
 * @author mandeep
18
 * @author mandeep
19
 */
19
 */
20
public class Ticket {
20
public class Ticket {
21
    private long           id;
21
    private long           id;
22
    private Long           customerId;
22
    private Long           customerId;
23
    private String         customerEmailId;
-
 
24
    private Date           openDate;
23
    private Date           openDate;
25
    private Date           closeDate;
24
    private Date           closeDate;
26
    private long           creatorId;
25
    private long           creatorId;
27
    private String         description;
26
    private String         description;
28
    private TicketStatus   status;
27
    private TicketStatus   status;
Line 33... Line 32...
33
    // Fields from user communication
32
    // Fields from user communication
34
    private Long           orderId;
33
    private Long           orderId;
35
    private String         airwayBillNo;
34
    private String         airwayBillNo;
36
    private String         productName;
35
    private String         productName;
37
 
36
 
-
 
37
    // fields for unregistered users
-
 
38
    private String         customerEmailId;
-
 
39
    private String         customerMobileNumber;
-
 
40
    private String         customerName;
-
 
41
 
-
 
42
    // knitted fields
-
 
43
    private Agent          assignee;
-
 
44
    private Agent          creator;
-
 
45
 
38
    /**
46
    /**
39
     * Converts thrift ticket object representation to our domain object
47
     * Converts thrift ticket object representation to our domain object
40
     * 
48
     * 
41
     * @param tticket
49
     * @param tticket
42
     * @return
50
     * @return
Line 80... Line 88...
80
 
88
 
81
        if (tticket.isSetOrderId()) {
89
        if (tticket.isSetOrderId()) {
82
            ticket.orderId = tticket.getOrderId();
90
            ticket.orderId = tticket.getOrderId();
83
        }
91
        }
84
 
92
 
-
 
93
        if (tticket.isSetAirwayBillNo()) {
-
 
94
            ticket.airwayBillNo = tticket.getAirwayBillNo();
-
 
95
        }
-
 
96
 
-
 
97
        if (tticket.isSetProductName()) {
-
 
98
            ticket.productName = tticket.getProductName();
-
 
99
        }
-
 
100
 
-
 
101
        if (tticket.isSetCustomerMobileNumber()) {
-
 
102
            ticket.customerMobileNumber = tticket.getCustomerMobileNumber();
-
 
103
        }
-
 
104
 
-
 
105
        if (tticket.isSetCustomerName()) {
-
 
106
            ticket.customerName = tticket.getCustomerName();
-
 
107
        }
-
 
108
 
-
 
109
        if (tticket.isSetAssignee()) {
-
 
110
            ticket.assignee = Agent.create(tticket.getAssignee());
-
 
111
        }
-
 
112
 
-
 
113
        if (tticket.isSetCreator()) {
-
 
114
            ticket.creator = Agent.create(tticket.getCreator());
-
 
115
        }
-
 
116
 
85
        return ticket;
117
        return ticket;
86
    }
118
    }
87
 
119
 
88
    /**
120
    /**
89
     * Converts this object to its corresponding thrift representation.
121
     * Converts this object to its corresponding thrift representation.
Line 103... Line 135...
103
 
135
 
104
        if (customerId != null) {
136
        if (customerId != null) {
105
            tticket.setCustomerId(customerId);
137
            tticket.setCustomerId(customerId);
106
        }
138
        }
107
 
139
 
108
        if (customerEmailId != null) {
-
 
109
            tticket.setCustomerEmailId(customerEmailId);
-
 
110
        }
-
 
111
 
-
 
112
        if (assigneeId != null) {
140
        if (assigneeId != null) {
113
            tticket.setAssigneeId(assigneeId);
141
            tticket.setAssigneeId(assigneeId);
114
        }
142
        }
115
 
143
 
116
        if (orderId != null) {
144
        if (orderId != null) {
117
            tticket.setOrderId(orderId);
145
            tticket.setOrderId(orderId);
118
        }
146
        }
119
 
147
 
-
 
148
        if (airwayBillNo != null) {
-
 
149
            tticket.setAirwayBillNo(airwayBillNo);
-
 
150
        }
-
 
151
 
-
 
152
        if (productName != null) {
-
 
153
            tticket.setProductName(productName);
-
 
154
        }
-
 
155
 
120
        if (openDate != null) {
156
        if (openDate != null) {
121
            tticket.setOpenDate(openDate.getTime());
157
            tticket.setOpenDate(openDate.getTime());
122
        }
158
        }
123
 
159
 
124
        if (closeDate != null) {
160
        if (closeDate != null) {
125
            tticket.setCloseDate(closeDate.getTime());
161
            tticket.setCloseDate(closeDate.getTime());
126
        }
162
        }
127
 
163
 
-
 
164
        if (customerEmailId != null) {
-
 
165
            tticket.setCustomerEmailId(customerEmailId);
-
 
166
        }
-
 
167
 
-
 
168
        if (customerMobileNumber != null) {
-
 
169
            tticket.setCustomerMobileNumber(customerMobileNumber);
-
 
170
        }
-
 
171
 
-
 
172
        if (customerName != null) {
-
 
173
            tticket.setCustomerName(customerName);
-
 
174
        }
-
 
175
 
-
 
176
        if (assignee != null) {
-
 
177
            tticket.setAssignee(assignee.getThriftAgent());
-
 
178
        }
-
 
179
 
-
 
180
        if (creator != null) {
-
 
181
            tticket.setCreator(creator.getThriftAgent());
-
 
182
        }
-
 
183
 
128
        return tticket;
184
        return tticket;
129
    }
185
    }
130
 
186
 
131
    public long getId() {
187
    public long getId() {
132
        return id;
188
        return id;
Line 237... Line 293...
237
    }
293
    }
238
 
294
 
239
    public void setCustomerEmailId(String customerEmailId) {
295
    public void setCustomerEmailId(String customerEmailId) {
240
        this.customerEmailId = customerEmailId;
296
        this.customerEmailId = customerEmailId;
241
    }
297
    }
-
 
298
 
-
 
299
    public String getCustomerMobileNumber() {
-
 
300
        return customerMobileNumber;
-
 
301
    }
-
 
302
 
-
 
303
    public void setCustomerMobileNumber(String customerMobileNumber) {
-
 
304
        this.customerMobileNumber = customerMobileNumber;
-
 
305
    }
-
 
306
 
-
 
307
    public String getCustomerName() {
-
 
308
        return customerName;
-
 
309
    }
-
 
310
 
-
 
311
    public void setCustomerName(String customerName) {
-
 
312
        this.customerName = customerName;
-
 
313
    }
-
 
314
 
-
 
315
    public Agent getAssignee() {
-
 
316
        return assignee;
-
 
317
    }
-
 
318
 
-
 
319
    public void setAssignee(Agent assignee) {
-
 
320
        this.assignee = assignee;
-
 
321
    }
-
 
322
 
-
 
323
    public Agent getCreator() {
-
 
324
        return creator;
-
 
325
    }
-
 
326
 
-
 
327
    public void setCreator(Agent creator) {
-
 
328
        this.creator = creator;
-
 
329
    }
242
}
330
}