1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
package org.mule.samples.voipservice.to; |
12 | |
|
13 | |
import org.mule.samples.voipservice.LocaleMessage; |
14 | |
|
15 | |
import java.io.Serializable; |
16 | |
|
17 | |
public class ServiceParamTO implements Serializable |
18 | |
{ |
19 | |
|
20 | |
|
21 | |
|
22 | |
private static final long serialVersionUID = -4807303917627749519L; |
23 | |
|
24 | |
private CustomerTO customerTO; |
25 | |
private CreditCardTO creditCardTO; |
26 | |
|
27 | |
public ServiceParamTO() |
28 | |
{ |
29 | 0 | super(); |
30 | 0 | } |
31 | |
|
32 | |
public ServiceParamTO(CustomerTO customerTO, CreditCardTO creditCardTO) |
33 | 0 | { |
34 | 0 | this.customerTO = customerTO; |
35 | 0 | this.creditCardTO = creditCardTO; |
36 | 0 | } |
37 | |
|
38 | |
public void setCustomer(CustomerTO customerTO) |
39 | |
{ |
40 | 0 | this.customerTO = customerTO; |
41 | 0 | } |
42 | |
|
43 | |
public CustomerTO getCustomer() |
44 | |
{ |
45 | 0 | return customerTO; |
46 | |
} |
47 | |
|
48 | |
public void setCreditCard(CreditCardTO creditCardTO) |
49 | |
{ |
50 | 0 | this.creditCardTO = creditCardTO; |
51 | 0 | } |
52 | |
|
53 | |
public CreditCardTO getCreditCard() |
54 | |
{ |
55 | 0 | return creditCardTO; |
56 | |
} |
57 | |
|
58 | |
public String toString() |
59 | |
{ |
60 | 0 | StringBuffer stringBuffer = new StringBuffer(); |
61 | 0 | if (this.customerTO != null) |
62 | |
{ |
63 | 0 | stringBuffer.append(LocaleMessage.getCustomerCaption(customerTO)); |
64 | |
} |
65 | 0 | if (this.creditCardTO != null) |
66 | |
{ |
67 | 0 | stringBuffer.append(LocaleMessage.getCardCaption(creditCardTO)); |
68 | |
} |
69 | |
|
70 | 0 | return stringBuffer.toString(); |
71 | |
} |
72 | |
|
73 | |
} |