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 | |
|
18 | |
|
19 | |
|
20 | |
public class ServiceParamTO implements Serializable |
21 | |
{ |
22 | |
|
23 | |
|
24 | |
|
25 | |
private static final long serialVersionUID = -4807303917627749519L; |
26 | |
|
27 | |
private CustomerTO customerTO; |
28 | |
private CreditCardTO creditCardTO; |
29 | |
|
30 | |
public ServiceParamTO() |
31 | |
{ |
32 | 0 | super(); |
33 | 0 | } |
34 | |
|
35 | |
public ServiceParamTO(CustomerTO customerTO, CreditCardTO creditCardTO) |
36 | 0 | { |
37 | 0 | this.customerTO = customerTO; |
38 | 0 | this.creditCardTO = creditCardTO; |
39 | 0 | } |
40 | |
|
41 | |
public void setCustomer(CustomerTO customerTO) |
42 | |
{ |
43 | 0 | this.customerTO = customerTO; |
44 | 0 | } |
45 | |
|
46 | |
public CustomerTO getCustomer() |
47 | |
{ |
48 | 0 | return customerTO; |
49 | |
} |
50 | |
|
51 | |
public void setCreditCard(CreditCardTO creditCardTO) |
52 | |
{ |
53 | 0 | this.creditCardTO = creditCardTO; |
54 | 0 | } |
55 | |
|
56 | |
public CreditCardTO getCreditCard() |
57 | |
{ |
58 | 0 | return creditCardTO; |
59 | |
} |
60 | |
|
61 | |
public String toString() |
62 | |
{ |
63 | 0 | StringBuffer stringBuffer = new StringBuffer(); |
64 | 0 | if (this.customerTO != null) |
65 | |
{ |
66 | 0 | stringBuffer.append(LocaleMessage.getCustomerCaption(customerTO)); |
67 | |
} |
68 | 0 | if (this.creditCardTO != null) |
69 | |
{ |
70 | 0 | stringBuffer.append(LocaleMessage.getCardCaption(creditCardTO)); |
71 | |
} |
72 | |
|
73 | 0 | return stringBuffer.toString(); |
74 | |
} |
75 | |
|
76 | |
} |